home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / DTS Sample Code / Macintosh Sample Code / Monthly Releases (Compressed) / MacDTS.Sample.Code.90.05.sit / SC.011.GetZoneList / GetZoneList.p < prev    next >
MacBinary  |  1990-05-01  |  24.0 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert ZX81 Sinclair BASIC (image/sinclairBASIC) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue May 1 16:27:09 1990, modified Tue May 1 16:27:09 1990, creator 'MPS ', type ASCII, 23542 bytes "GetZoneList.p" , at 0x5c76 886 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 47 65 74 5a 6f 6e | 65 4c 69 73 74 2e 70 00 |..GetZon|eList.p.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 5b f6 00 | 00 03 76 a2 63 a1 9d a2 |.....[..|..v.c...|
|00000060| 63 a1 9d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |c.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 8d 23 00 00 |........|.....#..|
|00000080| 7b 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |{-------|--------|
|00000090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0d |--------|-------.|
|000000d0| 23 0d 23 09 41 70 70 6c | 65 20 4d 61 63 69 6e 74 |#.#.Appl|e Macint|
|000000e0| 6f 73 68 20 44 65 76 65 | 6c 6f 70 65 72 20 54 65 |osh Deve|loper Te|
|000000f0| 63 68 6e 69 63 61 6c 20 | 53 75 70 70 6f 72 74 0d |chnical |Support.|
|00000100| 23 0d 23 09 41 70 70 6c | 65 54 61 6c 6b 20 47 65 |#.#.Appl|eTalk Ge|
|00000110| 74 5a 6f 6e 65 4c 69 73 | 74 20 53 61 6d 70 6c 65 |tZoneLis|t Sample|
|00000120| 20 41 70 70 6c 69 63 61 | 74 69 6f 6e 0d 23 0d 23 | Applica|tion.#.#|
|00000130| 09 47 65 74 5a 6f 6e 65 | 4c 69 73 74 0d 23 0d 23 |.GetZone|List.#.#|
|00000140| 09 47 65 74 5a 6f 6e 65 | 4c 69 73 74 2e 70 09 2d |.GetZone|List.p.-|
|00000150| 09 50 61 73 63 61 6c 20 | 53 6f 75 72 63 65 0d 23 |.Pascal |Source.#|
|00000160| 0d 23 09 43 6f 70 79 72 | 69 67 68 74 20 a9 20 31 |.#.Copyr|ight . 1|
|00000170| 39 38 38 2d 39 30 20 41 | 70 70 6c 65 20 43 6f 6d |988-90 A|pple Com|
|00000180| 70 75 74 65 72 2c 20 49 | 6e 63 2e 0d 23 09 41 6c |puter, I|nc..#.Al|
|00000190| 6c 20 72 69 67 68 74 73 | 20 72 65 73 65 72 76 65 |l rights| reserve|
|000001a0| 64 2e 0d 23 0d 23 09 56 | 65 72 73 69 6f 6e 73 3a |d..#.#.V|ersions:|
|000001b0| 09 31 2e 30 09 09 09 09 | 09 4e 6f 76 65 6d 62 65 |.1.0....|.Novembe|
|000001c0| 72 20 31 39 38 38 0d 23 | 09 09 09 09 31 2e 31 09 |r 1988.#|....1.1.|
|000001d0| 09 09 09 09 4f 63 74 6f | 62 65 72 20 31 39 38 39 |....Octo|ber 1989|
|000001e0| 0d 23 09 09 09 09 31 2e | 32 09 09 09 09 09 4d 61 |.#....1.|2.....Ma|
|000001f0| 79 20 31 39 39 30 0d 23 | 0d 23 09 43 6f 6d 70 6f |y 1990.#|.#.Compo|
|00000200| 6e 65 6e 74 73 3a 09 47 | 65 74 5a 6f 6e 65 4c 69 |nents:.G|etZoneLi|
|00000210| 73 74 2e 70 09 09 4d 61 | 79 20 31 2c 20 31 39 39 |st.p..Ma|y 1, 199|
|00000220| 30 0d 23 09 09 09 09 47 | 65 74 5a 6f 6e 65 4c 69 |0.#....G|etZoneLi|
|00000230| 73 74 2e 72 09 09 4d 61 | 79 20 31 2c 20 31 39 39 |st.r..Ma|y 1, 199|
|00000240| 30 0d 23 09 09 09 09 4d | 61 6b 65 46 69 6c 65 09 |0.#....M|akeFile.|
|00000250| 09 09 4d 61 79 20 31 2c | 20 31 39 39 30 0d 23 09 |..May 1,| 1990.#.|
|00000260| 09 09 09 55 46 61 69 6c | 75 72 65 2e 61 09 09 09 |...UFail|ure.a...|
|00000270| 4e 6f 76 65 6d 62 65 72 | 20 31 2c 20 31 39 38 38 |November| 1, 1988|
|00000280| 0d 23 09 09 09 09 55 46 | 61 69 6c 75 72 65 2e 69 |.#....UF|ailure.i|
|00000290| 6e 63 31 2e 70 09 09 4e | 6f 76 65 6d 62 65 72 20 |nc1.p..N|ovember |
|000002a0| 31 2c 20 31 39 38 38 0d | 23 09 09 09 09 55 46 61 |1, 1988.|#....UFa|
|000002b0| 69 6c 75 72 65 2e 70 09 | 09 09 4e 6f 76 65 6d 62 |ilure.p.|..Novemb|
|000002c0| 65 72 20 31 2c 20 31 39 | 38 38 0d 23 0d 23 09 47 |er 1, 19|88.#.#.G|
|000002d0| 65 74 5a 6f 6e 65 4c 69 | 73 74 20 69 73 20 61 20 |etZoneLi|st is a |
|000002e0| 73 61 6d 70 6c 65 20 61 | 70 70 6c 69 63 61 74 69 |sample a|pplicati|
|000002f0| 6f 6e 20 74 68 61 74 20 | 75 73 65 73 0d 23 09 41 |on that |uses.#.A|
|00000300| 70 70 6c 65 54 61 6c 6b | 20 41 54 50 20 61 6e 64 |ppleTalk| ATP and|
|00000310| 20 5a 49 50 20 74 6f 20 | 6f 62 74 61 69 6e 20 61 | ZIP to |obtain a|
|00000320| 20 6c 69 73 74 20 6f 66 | 20 7a 6f 6e 65 73 0d 23 | list of| zones.#|
|00000330| 09 6f 6e 20 61 6e 20 41 | 70 70 6c 65 54 61 6c 6b |.on an A|ppleTalk|
|00000340| 20 69 6e 74 65 72 6e 65 | 74 2e 0d 23 0d 23 09 47 | interne|t..#.#.G|
|00000350| 65 74 5a 6f 6e 65 4c 69 | 73 74 20 61 6c 73 6f 20 |etZoneLi|st also |
|00000360| 64 65 6d 6f 6e 73 74 72 | 61 74 65 73 20 75 73 69 |demonstr|ates usi|
|00000370| 6e 67 20 61 20 73 69 67 | 6e 61 6c 2c 20 6f 72 0d |ng a sig|nal, or.|
|00000380| 23 09 66 61 69 6c 75 72 | 65 2d 63 61 74 63 68 69 |#.failur|e-catchi|
|00000390| 6e 67 20 6d 65 63 68 61 | 6e 69 73 6d 20 74 6f 20 |ng mecha|nism to |
|000003a0| 72 65 63 6f 76 65 72 20 | 66 72 6f 6d 20 65 72 72 |recover |from err|
|000003b0| 6f 72 0d 23 09 73 69 74 | 75 61 74 69 6f 6e 73 2e |or.#.sit|uations.|
|000003c0| 0d 23 0d 23 09 47 65 74 | 5a 6f 6e 65 4c 69 73 74 |.#.#.Get|ZoneList|
|000003d0| 20 69 73 20 62 61 73 65 | 64 20 6f 6e 20 44 54 53 | is base|d on DTS|
|000003e0| 20 53 61 6d 70 6c 65 2e | 70 2e 20 46 6f 72 20 6d | Sample.|p. For m|
|000003f0| 6f 72 65 0d 23 09 64 65 | 73 63 72 69 70 74 69 6f |ore.#.de|scriptio|
|00000400| 6e 20 61 6e 64 20 65 78 | 70 6c 61 6e 61 6e 74 69 |n and ex|plananti|
|00000410| 6f 6e 20 6f 66 20 74 68 | 65 20 6e 6f 6e 2d 65 78 |on of th|e non-ex|
|00000420| 61 6d 70 6c 65 0d 23 09 | 73 70 65 63 69 66 69 63 |ample.#.|specific|
|00000430| 20 61 72 65 61 73 20 6f | 66 20 74 68 69 73 20 61 | areas o|f this a|
|00000440| 70 70 6c 69 63 61 74 69 | 6f 6e 2c 20 70 6c 65 61 |pplicati|on, plea|
|00000450| 73 65 20 72 65 66 65 72 | 20 74 6f 0d 23 09 65 69 |se refer| to.#.ei|
|00000460| 74 68 65 72 20 53 61 6d | 70 6c 65 2e 70 20 6f 72 |ther Sam|ple.p or|
|00000470| 20 54 45 53 61 6d 70 6c | 65 2e 70 2e 0d 23 0d 2d | TESampl|e.p..#.-|
|00000480| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000490| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 7d 0d 0d |--------|-----}..|
|000004d0| 50 52 4f 47 52 41 4d 20 | 47 65 74 5a 6f 6e 65 4c |PROGRAM |GetZoneL|
|000004e0| 69 73 74 3b 0d 0d 55 53 | 45 53 0d 09 4d 65 6d 54 |ist;..US|ES..MemT|
|000004f0| 79 70 65 73 2c 20 51 75 | 69 63 6b 44 72 61 77 2c |ypes, Qu|ickDraw,|
|00000500| 20 4f 53 49 6e 74 66 2c | 20 54 6f 6f 6c 49 6e 74 | OSIntf,| ToolInt|
|00000510| 66 2c 20 41 70 70 6c 65 | 54 61 6c 6b 2c 20 50 61 |f, Apple|Talk, Pa|
|00000520| 63 6b 49 6e 74 66 2c 20 | 46 69 78 4d 61 74 68 2c |ckIntf, |FixMath,|
|00000530| 20 53 63 72 69 70 74 2c | 20 55 46 61 69 6c 75 72 | Script,| UFailur|
|00000540| 65 3b 0d 0d 54 59 50 45 | 0d 7b 6f 66 66 73 65 74 |e;..TYPE|.{offset|
|00000550| 73 20 66 6f 72 20 78 43 | 61 6c 6c 20 71 75 65 75 |s for xC|all queu|
|00000560| 65 20 65 6c 65 6d 65 6e | 74 73 2e 20 20 53 65 65 |e elemen|ts. See|
|00000570| 20 54 65 63 68 6e 69 63 | 61 6c 20 4e 6f 74 65 20 | Technic|al Note |
|00000580| 23 32 35 30 2e 7d 0d 0d | 78 43 61 6c 6c 50 61 72 |#250.}..|xCallPar|
|00000590| 61 6d 20 3d 20 50 41 43 | 4b 45 44 20 52 45 43 4f |am = PAC|KED RECO|
|000005a0| 52 44 0d 09 71 4c 69 6e | 6b 3a 51 45 6c 65 6d 50 |RD..qLin|k:QElemP|
|000005b0| 74 72 3b 0d 09 71 54 79 | 70 65 3a 49 4e 54 45 47 |tr;..qTy|pe:INTEG|
|000005c0| 45 52 3b 0d 09 69 6f 54 | 72 61 70 3a 49 4e 54 45 |ER;..ioT|rap:INTE|
|000005d0| 47 45 52 3b 0d 09 69 6f | 43 6d 64 41 64 64 72 3a |GER;..io|CmdAddr:|
|000005e0| 50 74 72 3b 0d 09 69 6f | 43 6f 6d 70 6c 65 74 69 |Ptr;..io|Completi|
|000005f0| 6f 6e 3a 50 72 6f 63 50 | 74 72 3b 0d 09 69 6f 52 |on:ProcP|tr;..ioR|
|00000600| 65 73 75 6c 74 3a 4f 53 | 45 72 72 3b 0d 09 69 6f |esult:OS|Err;..io|
|00000610| 4e 61 6d 65 50 74 72 3a | 53 74 72 69 6e 67 50 74 |NamePtr:|StringPt|
|00000620| 72 3b 0d 09 69 6f 56 52 | 65 66 4e 75 6d 3a 49 4e |r;..ioVR|efNum:IN|
|00000630| 54 45 47 45 52 3b 0d 09 | 69 6f 52 65 66 4e 75 6d |TEGER;..|ioRefNum|
|00000640| 3a 49 4e 54 45 47 45 52 | 3b 0d 09 63 73 43 6f 64 |:INTEGER|;..csCod|
|00000650| 65 3a 49 4e 54 45 47 45 | 52 3b 0d 09 78 70 70 53 |e:INTEGE|R;..xppS|
|00000660| 75 62 43 6f 64 65 3a 49 | 4e 54 45 47 45 52 3b 0d |ubCode:I|NTEGER;.|
|00000670| 09 78 70 70 54 69 6d 65 | 4f 75 74 3a 42 79 74 65 |.xppTime|Out:Byte|
|00000680| 3b 0d 09 78 70 70 52 65 | 74 72 79 3a 42 79 74 65 |;..xppRe|try:Byte|
|00000690| 3b 0d 09 66 69 6c 6c 65 | 72 3a 49 4e 54 45 47 45 |;..fille|r:INTEGE|
|000006a0| 52 3b 0d 09 7a 69 70 42 | 75 66 66 50 74 72 3a 50 |R;..zipB|uffPtr:P|
|000006b0| 74 72 3b 0d 09 7a 69 70 | 4e 75 6d 5a 6f 6e 65 73 |tr;..zip|NumZones|
|000006c0| 3a 49 4e 54 45 47 45 52 | 3b 0d 09 7a 69 70 4c 61 |:INTEGER|;..zipLa|
|000006d0| 73 74 46 6c 61 67 3a 49 | 4e 54 45 47 45 52 3b 0d |stFlag:I|NTEGER;.|
|000006e0| 09 7a 69 70 49 6e 66 6f | 46 69 65 6c 64 3a 20 20 |.zipInfo|Field: |
|000006f0| 50 41 43 4b 45 44 20 41 | 52 52 41 59 20 5b 31 2e |PACKED A|RRAY [1.|
|00000700| 2e 37 30 5d 20 6f 66 20 | 42 79 74 65 3b 0d 45 4e |.70] of |Byte;.EN|
|00000710| 44 3b 0d 78 43 61 6c 6c | 50 61 72 61 6d 42 6c 6b |D;.xCall|ParamBlk|
|00000720| 50 74 72 20 3d 20 5e 78 | 43 61 6c 6c 50 61 72 61 |Ptr = ^x|CallPara|
|00000730| 6d 3b 0d 0d 0d 43 4f 4e | 53 54 0d 09 5f 57 61 69 |m;...CON|ST.._Wai|
|00000740| 74 4e 65 78 74 45 76 65 | 6e 74 09 09 09 3d 20 24 |tNextEve|nt...= $|
|00000750| 41 38 36 30 3b 0d 09 5f | 55 6e 69 6d 70 6c 65 6d |A860;.._|Unimplem|
|00000760| 65 6e 74 65 64 09 09 09 | 3d 20 24 41 38 39 46 3b |ented...|= $A89F;|
|00000770| 0d 09 6b 53 79 73 45 6e | 76 69 72 6f 6e 73 56 65 |..kSysEn|vironsVe|
|00000780| 72 73 69 6f 6e 09 09 3d | 20 31 3b 0d 09 6b 4f 53 |rsion..=| 1;..kOS|
|00000790| 45 76 65 6e 74 09 09 09 | 09 3d 20 61 70 70 34 45 |Event...|.= app4E|
|000007a0| 76 74 3b 09 7b 65 76 65 | 6e 74 20 75 73 65 64 20 |vt;.{eve|nt used |
|000007b0| 62 79 20 4d 75 6c 74 69 | 46 69 6e 64 65 72 7d 0d |by Multi|Finder}.|
|000007c0| 09 6b 53 75 73 70 65 6e | 64 52 65 73 75 6d 65 4d |.kSuspen|dResumeM|
|000007d0| 65 73 73 61 67 65 09 3d | 20 31 3b 09 09 7b 68 69 |essage.=| 1;..{hi|
|000007e0| 67 68 20 62 79 74 65 20 | 6f 66 20 73 75 73 70 65 |gh byte |of suspe|
|000007f0| 6e 64 2f 72 65 73 75 6d | 65 20 65 76 65 6e 74 20 |nd/resum|e event |
|00000800| 6d 65 73 73 61 67 65 7d | 0d 09 6b 52 65 73 75 6d |message}|..kResum|
|00000810| 65 4d 61 73 6b 09 09 09 | 09 3d 20 31 3b 09 09 7b |eMask...|.= 1;..{|
|00000820| 62 69 74 20 6f 66 20 6d | 65 73 73 61 67 65 20 66 |bit of m|essage f|
|00000830| 69 65 6c 64 20 66 6f 72 | 20 72 65 73 75 6d 65 20 |ield for| resume |
|00000840| 76 73 2e 20 73 75 73 70 | 65 6e 64 7d 0d 0d 09 6b |vs. susp|end}...k|
|00000850| 43 52 09 09 09 09 3d 20 | 31 33 3b 09 09 09 09 7b |CR....= |13;....{|
|00000860| 63 61 72 72 69 61 67 65 | 20 72 65 74 75 72 6e 20 |carriage| return |
|00000870| 63 68 61 72 61 63 74 65 | 72 7d 0d 09 6b 45 4e 54 |characte|r}..kENT|
|00000880| 45 52 09 09 09 3d 20 33 | 3b 09 09 09 09 7b 65 6e |ER...= 3|;....{en|
|00000890| 74 65 72 20 63 68 61 72 | 61 63 74 65 72 7d 0d 09 |ter char|acter}..|
|000008a0| 6b 53 63 72 6f 6c 6c 42 | 61 72 57 69 64 74 68 09 |kScrollB|arWidth.|
|000008b0| 3d 20 31 35 3b 09 09 09 | 09 7b 74 68 65 20 77 69 |= 15;...|.{the wi|
|000008c0| 64 74 68 20 6f 66 20 74 | 68 65 20 73 63 72 6f 6c |dth of t|he scrol|
|000008d0| 6c 62 61 72 20 69 6e 20 | 74 68 65 20 6c 69 73 74 |lbar in |the list|
|000008e0| 7d 0d 09 6b 4c 69 73 74 | 49 6e 73 65 74 09 09 3d |}..kList|Inset..=|
|000008f0| 20 2d 31 3b 09 09 09 09 | 7b 61 64 6a 75 73 74 6d | -1;....|{adjustm|
|00000900| 65 6e 74 20 66 6f 72 20 | 6c 69 73 74 20 66 72 61 |ent for |list fra|
|00000910| 6d 65 7d 0d 09 6b 41 54 | 50 54 69 6d 65 4f 75 74 |me}..kAT|PTimeOut|
|00000920| 56 61 6c 09 3d 20 33 3b | 09 09 09 09 7b 72 65 2d |Val.= 3;|....{re-|
|00000930| 74 72 79 20 41 54 50 20 | 53 65 6e 64 52 65 71 75 |try ATP |SendRequ|
|00000940| 65 73 74 20 65 76 65 72 | 79 20 33 20 73 65 63 6f |est ever|y 3 seco|
|00000950| 6e 64 73 7d 0d 09 6b 41 | 54 50 52 65 74 72 79 43 |nds}..kA|TPRetryC|
|00000960| 6f 75 6e 74 09 3d 20 35 | 3b 09 09 09 09 7b 66 6f |ount.= 5|;....{fo|
|00000970| 72 20 66 69 76 65 20 74 | 69 6d 65 73 7d 0d 09 6b |r five t|imes}..k|
|00000980| 5a 6f 6e 65 73 53 69 7a | 65 09 09 3d 20 35 37 38 |ZonesSiz|e..= 578|
|00000990| 3b 09 09 09 09 7b 73 69 | 7a 65 20 6f 66 20 62 75 |;....{si|ze of bu|
|000009a0| 66 66 65 72 20 66 6f 72 | 20 7a 6f 6e 65 20 6e 61 |ffer for| zone na|
|000009b0| 6d 65 73 7d 0d 09 6b 47 | 5a 4c 43 61 6c 6c 09 09 |mes}..kG|ZLCall..|
|000009c0| 3d 20 24 30 38 30 30 30 | 30 30 30 3b 09 09 7b 47 |= $08000|000;..{G|
|000009d0| 65 74 5a 6f 6e 65 4c 69 | 73 74 20 69 6e 64 69 63 |etZoneLi|st indic|
|000009e0| 61 74 6f 72 7d 0d 09 6b | 5a 49 50 53 6f 63 6b 65 |ator}..k|ZIPSocke|
|000009f0| 74 09 09 3d 20 36 3b 09 | 09 09 09 7b 74 68 65 20 |t..= 6;.|...{the |
|00000a00| 5a 6f 6e 65 20 49 6e 66 | 6f 72 6d 61 74 69 6f 6e |Zone Inf|ormation|
|00000a10| 20 50 72 6f 74 6f 63 6f | 6c 20 73 6f 63 6b 65 74 | Protoco|l socket|
|00000a20| 7d 0d 09 6b 4d 6f 72 65 | 5a 6f 6e 65 73 09 09 3d |}..kMore|Zones..=|
|00000a30| 20 24 46 46 30 30 30 30 | 30 30 3b 09 09 7b 6d 61 | $FF0000|00;..{ma|
|00000a40| 73 6b 20 74 6f 20 73 65 | 65 20 69 66 20 6d 6f 72 |sk to se|e if mor|
|00000a50| 65 20 7a 6f 6e 65 73 20 | 74 6f 20 63 6f 6d 65 7d |e zones |to come}|
|00000a60| 0d 09 6b 5a 6f 6e 65 43 | 6f 75 6e 74 09 09 3d 20 |..kZoneC|ount..= |
|00000a70| 24 30 30 30 30 46 46 46 | 46 3b 09 09 7b 6d 61 73 |$0000FFF|F;..{mas|
|00000a80| 6b 20 74 6f 20 63 6f 75 | 6e 74 20 7a 6f 6e 65 73 |k to cou|nt zones|
|00000a90| 20 69 6e 20 62 75 66 66 | 65 72 7d 0d 09 6b 48 69 | in buff|er}..kHi|
|00000aa0| 6c 69 74 65 09 09 09 3d | 20 31 3b 09 09 09 09 7b |lite...=| 1;....{|
|00000ab0| 68 69 6c 69 74 65 20 76 | 61 6c 75 65 20 66 6f 72 |hilite v|alue for|
|00000ac0| 20 62 75 74 74 6f 6e 20 | 63 6f 6e 74 72 6f 6c 7d | button |control}|
|00000ad0| 0d 09 6b 44 65 48 69 6c | 69 74 65 09 09 3d 20 30 |..kDeHil|ite..= 0|
|00000ae0| 3b 09 09 09 09 7b 64 65 | 68 69 6c 69 74 65 20 76 |;....{de|hilite v|
|00000af0| 61 6c 75 65 20 66 6f 72 | 20 62 75 74 74 6f 6e 20 |alue for| button |
|00000b00| 63 6f 6e 74 72 6f 6c 7d | 0d 09 6b 48 69 6c 69 74 |control}|..kHilit|
|00000b10| 65 44 65 6c 61 79 09 3d | 20 38 3b 09 09 09 09 7b |eDelay.=| 8;....{|
|00000b20| 74 69 6d 65 20 69 6e 20 | 74 69 63 6b 73 20 74 6f |time in |ticks to|
|00000b30| 20 6c 65 61 76 65 20 62 | 75 74 74 6f 6e 20 68 69 | leave b|utton hi|
|00000b40| 6c 69 74 65 64 7d 0d 0d | 09 6b 4d 69 6e 48 65 61 |lited}..|.kMinHea|
|00000b50| 70 09 09 3d 20 28 32 39 | 20 2a 20 31 30 32 34 29 |p..= (29| * 1024)|
|00000b60| 3b 0d 09 6b 4d 69 6e 53 | 70 61 63 65 09 09 3d 20 |;..kMinS|pace..= |
|00000b70| 28 32 30 20 2a 20 31 30 | 32 34 29 3b 0d 0d 09 73 |(20 * 10|24);...s|
|00000b80| 45 72 72 53 74 72 69 6e | 67 73 09 09 3d 20 31 32 |ErrStrin|gs..= 12|
|00000b90| 38 3b 09 09 09 09 7b 65 | 72 72 6f 72 20 73 74 72 |8;....{e|rror str|
|00000ba0| 69 6e 67 20 53 54 52 23 | 7d 0d 09 65 53 74 61 6e |ing STR#|}..eStan|
|00000bb0| 64 61 72 64 45 72 72 09 | 3d 20 31 3b 0d 09 65 57 |dardErr.|= 1;..eW|
|00000bc0| 72 6f 6e 67 4d 61 63 68 | 69 6e 65 09 3d 20 32 3b |rongMach|ine.= 2;|
|00000bd0| 0d 09 65 53 6d 61 6c 6c | 53 69 7a 65 09 09 3d 20 |..eSmall|Size..= |
|00000be0| 33 3b 0d 09 65 4e 6f 4d | 65 6d 6f 72 79 09 09 3d |3;..eNoM|emory..=|
|00000bf0| 20 34 3b 0d 09 65 41 70 | 70 6c 65 54 61 6c 6b 09 | 4;..eAp|pleTalk.|
|00000c00| 09 3d 20 35 3b 0d 09 65 | 4e 6f 5a 6f 6e 65 73 09 |.= 5;..e|NoZones.|
|00000c10| 09 3d 20 36 3b 0d 0d 09 | 72 41 62 6f 75 74 41 6c |.= 6;...|rAboutAl|
|00000c20| 65 72 74 09 09 3d 20 31 | 32 38 3b 09 09 09 09 7b |ert..= 1|28;....{|
|00000c30| 61 62 6f 75 74 20 61 6c | 65 72 74 7d 0d 09 72 5a |about al|ert}..rZ|
|00000c40| 6f 6e 65 44 69 61 6c 6f | 67 09 09 3d 20 31 32 39 |oneDialo|g..= 129|
|00000c50| 3b 09 09 09 09 7b 7a 6f | 6e 65 20 6c 69 73 74 20 |;....{zo|ne list |
|00000c60| 64 69 61 6c 6f 67 7d 0d | 09 64 5a 6f 6e 65 4c 69 |dialog}.|.dZoneLi|
|00000c70| 73 74 09 09 3d 20 32 3b | 09 09 09 09 7b 75 73 65 |st..= 2;|....{use|
|00000c80| 72 20 69 74 65 6d 20 74 | 68 61 74 20 69 73 20 7a |r item t|hat is z|
|00000c90| 6f 6e 65 20 6c 69 73 74 | 7d 0d 09 64 44 65 66 61 |one list|}..dDefa|
|00000ca0| 75 6c 74 09 09 3d 20 33 | 3b 09 09 09 09 7b 75 73 |ult..= 3|;....{us|
|00000cb0| 65 72 20 69 74 65 6d 20 | 74 68 61 74 20 69 73 20 |er item |that is |
|00000cc0| 64 65 66 61 75 6c 74 20 | 69 6e 64 69 63 61 74 6f |default |indicato|
|00000cd0| 72 7d 0d 09 72 55 73 65 | 72 41 6c 65 72 74 09 09 |r}..rUse|rAlert..|
|00000ce0| 3d 20 31 33 30 3b 09 09 | 09 09 7b 65 72 72 6f 72 |= 130;..|..{error|
|00000cf0| 20 61 6c 65 72 74 7d 0d | 0d 09 72 4d 65 6e 75 42 | alert}.|..rMenuB|
|00000d00| 61 72 09 09 3d 20 31 32 | 38 3b 09 09 09 09 7b 61 |ar..= 12|8;....{a|
|00000d10| 70 70 6c 69 63 61 74 69 | 6f 6e 27 73 20 6d 65 6e |pplicati|on's men|
|00000d20| 75 20 62 61 72 7d 0d 0d | 09 6d 41 70 70 6c 65 09 |u bar}..|.mApple.|
|00000d30| 09 09 3d 20 31 32 38 3b | 09 09 09 09 7b 41 70 70 |..= 128;|....{App|
|00000d40| 6c 65 20 6d 65 6e 75 7d | 0d 09 69 41 62 6f 75 74 |le menu}|..iAbout|
|00000d50| 09 09 09 3d 20 31 3b 0d | 0d 09 6d 46 69 6c 65 09 |...= 1;.|..mFile.|
|00000d60| 09 09 3d 20 31 32 39 3b | 09 09 09 09 7b 46 69 6c |..= 129;|....{Fil|
|00000d70| 65 20 6d 65 6e 75 7d 0d | 09 69 4e 65 77 09 09 09 |e menu}.|.iNew...|
|00000d80| 3d 20 31 3b 0d 09 69 43 | 6c 6f 73 65 09 09 09 3d |= 1;..iC|lose...=|
|00000d90| 20 34 3b 0d 09 69 51 75 | 69 74 09 09 09 3d 20 31 | 4;..iQu|it...= 1|
|00000da0| 32 3b 0d 0d 09 6d 45 64 | 69 74 09 09 09 3d 20 31 |2;...mEd|it...= 1|
|00000db0| 33 30 3b 09 09 09 09 7b | 45 64 69 74 20 6d 65 6e |30;....{|Edit men|
|00000dc0| 75 7d 0d 09 69 55 6e 64 | 6f 09 09 09 3d 20 31 3b |u}..iUnd|o...= 1;|
|00000dd0| 0d 09 69 43 75 74 09 09 | 09 3d 20 33 3b 0d 09 69 |..iCut..|.= 3;..i|
|00000de0| 43 6f 70 79 09 09 09 3d | 20 34 3b 0d 09 69 50 61 |Copy...=| 4;..iPa|
|00000df0| 73 74 65 09 09 09 3d 20 | 35 3b 0d 09 69 43 6c 65 |ste...= |5;..iCle|
|00000e00| 61 72 09 09 09 3d 20 36 | 3b 0d 0d 09 7b 31 2e 30 |ar...= 6|;...{1.0|
|00000e10| 31 20 2d 20 6b 44 49 54 | 6f 70 20 61 6e 64 20 6b |1 - kDIT|op and k|
|00000e20| 44 49 4c 65 66 74 20 61 | 72 65 20 75 73 65 64 20 |DILeft a|re used |
|00000e30| 74 6f 20 6c 6f 63 61 74 | 65 20 74 68 65 20 44 69 |to locat|e the Di|
|00000e40| 73 6b 20 49 6e 69 74 69 | 61 6c 69 7a 61 74 69 6f |sk Initi|alizatio|
|00000e50| 6e 20 64 69 61 6c 6f 67 | 73 2e 7d 0d 09 6b 44 49 |n dialog|s.}..kDI|
|00000e60| 54 6f 70 09 09 3d 20 24 | 30 30 35 30 3b 0d 09 6b |Top..= $|0050;..k|
|00000e70| 44 49 4c 65 66 74 09 09 | 3d 20 24 30 30 37 30 3b |DILeft..|= $0070;|
|00000e80| 0d 0d 7b 20 50 68 61 73 | 65 20 32 20 73 74 75 66 |..{ Phas|e 2 stuf|
|00000e90| 66 20 7d 0d 09 78 43 61 | 6c 6c 09 09 09 09 3d 20 |f }..xCa|ll....= |
|00000ea0| 32 34 36 3b 09 09 09 7b | 20 63 73 43 6f 64 65 20 |246;...{| csCode |
|00000eb0| 66 6f 72 20 50 68 61 73 | 65 20 32 20 63 61 6c 6c |for Phas|e 2 call|
|00000ec0| 73 20 74 6f 20 2e 58 50 | 50 20 7d 0d 09 7a 69 70 |s to .XP|P }..zip|
|00000ed0| 47 65 74 4c 6f 63 61 6c | 5a 6f 6e 65 73 20 09 3d |GetLocal|Zones .=|
|00000ee0| 20 35 3b 09 09 09 7b 20 | 2e 58 50 50 20 73 75 62 | 5;...{ |.XPP sub|
|00000ef0| 63 6f 64 65 73 20 7d 0d | 09 7a 69 70 47 65 74 5a |codes }.|.zipGetZ|
|00000f00| 6f 6e 65 4c 69 73 74 09 | 09 3d 20 36 3b 0d 09 7a |oneList.|.= 6;..z|
|00000f10| 69 70 47 65 74 4d 79 5a | 6f 6e 65 20 09 09 3d 20 |ipGetMyZ|one ..= |
|00000f20| 37 3b 0d 0d 56 41 52 0d | 09 67 4d 61 63 09 09 09 |7;..VAR.|.gMac...|
|00000f30| 09 3a 20 53 79 73 45 6e | 76 52 65 63 3b 09 7b 73 |.: SysEn|vRec;.{s|
|00000f40| 65 74 20 75 70 20 62 79 | 20 49 6e 69 74 69 61 6c |et up by| Initial|
|00000f50| 69 7a 65 7d 0d 09 67 48 | 61 73 57 61 69 74 4e 65 |ize}..gH|asWaitNe|
|00000f60| 78 74 45 76 65 6e 74 09 | 3a 20 42 4f 4f 4c 45 41 |xtEvent.|: BOOLEA|
|00000f70| 4e 3b 09 09 7b 73 65 74 | 20 75 70 20 62 79 20 49 |N;..{set| up by I|
|00000f80| 6e 69 74 69 61 6c 69 7a | 65 7d 0d 09 67 49 6e 42 |nitializ|e}..gInB|
|00000f90| 61 63 6b 67 72 6f 75 6e | 64 09 09 3a 20 42 4f 4f |ackgroun|d..: BOO|
|00000fa0| 4c 45 41 4e 3b 09 09 7b | 6d 61 69 6e 74 61 69 6e |LEAN;..{|maintain|
|00000fb0| 65 64 20 62 79 20 49 6e | 69 74 69 61 6c 69 7a 65 |ed by In|itialize|
|00000fc0| 20 61 6e 64 20 44 6f 45 | 76 65 6e 74 7d 0d 0d 09 | and DoE|vent}...|
|00000fd0| 67 4c 69 73 74 09 09 09 | 09 3a 20 4c 69 73 74 48 |gList...|.: ListH|
|00000fe0| 61 6e 64 6c 65 3b 09 7b | 74 68 65 20 6c 69 73 74 |andle;.{|the list|
|00000ff0| 20 74 6f 20 62 65 20 66 | 69 6c 6c 65 64 20 77 69 | to be f|illed wi|
|00001000| 74 68 20 7a 6f 6e 65 20 | 6e 61 6d 65 73 7d 0d 0d |th zone |names}..|
|00001010| 0d 0d 7b 24 53 20 49 6e | 69 74 69 61 6c 69 7a 65 |..{$S In|itialize|
|00001020| 7d 0d 46 55 4e 43 54 49 | 4f 4e 20 54 72 61 70 41 |}.FUNCTI|ON TrapA|
|00001030| 76 61 69 6c 61 62 6c 65 | 28 74 4e 75 6d 62 65 72 |vailable|(tNumber|
|00001040| 3a 20 49 4e 54 45 47 45 | 52 3b 20 74 54 79 70 65 |: INTEGE|R; tType|
|00001050| 3a 20 54 72 61 70 54 79 | 70 65 29 3a 20 42 4f 4f |: TrapTy|pe): BOO|
|00001060| 4c 45 41 4e 3b 0d 0d 7b | 43 68 65 63 6b 20 74 6f |LEAN;..{|Check to|
|00001070| 20 73 65 65 20 69 66 20 | 61 20 67 69 76 65 6e 20 | see if |a given |
|00001080| 74 72 61 70 20 69 73 20 | 69 6d 70 6c 65 6d 65 6e |trap is |implemen|
|00001090| 74 65 64 2e 20 54 68 69 | 73 20 69 73 20 6f 6e 6c |ted. Thi|s is onl|
|000010a0| 79 20 75 73 65 64 20 62 | 79 20 74 68 65 0d 20 49 |y used b|y the. I|
|000010b0| 6e 69 74 69 61 6c 69 7a | 65 20 72 6f 75 74 69 6e |nitializ|e routin|
|000010c0| 65 20 69 6e 20 74 68 69 | 73 20 70 72 6f 67 72 61 |e in thi|s progra|
|000010d0| 6d 2c 20 73 6f 20 77 65 | 20 70 75 74 20 69 74 20 |m, so we| put it |
|000010e0| 69 6e 20 74 68 65 20 49 | 6e 69 74 69 61 6c 69 7a |in the I|nitializ|
|000010f0| 65 20 73 65 67 6d 65 6e | 74 2e 0d 20 54 68 65 20 |e segmen|t.. The |
|00001100| 72 65 63 6f 6d 6d 65 6e | 64 65 64 20 61 70 70 72 |recommen|ded appr|
|00001110| 6f 61 63 68 20 74 6f 20 | 73 65 65 20 69 66 20 61 |oach to |see if a|
|00001120| 20 74 72 61 70 20 69 73 | 20 69 6d 70 6c 65 6d 65 | trap is| impleme|
|00001130| 6e 74 65 64 20 69 73 20 | 74 6f 20 73 65 65 20 69 |nted is |to see i|
|00001140| 66 0d 20 74 68 65 20 61 | 64 64 72 65 73 73 20 6f |f. the a|ddress o|
|00001150| 66 20 74 68 65 20 74 72 | 61 70 20 72 6f 75 74 69 |f the tr|ap routi|
|00001160| 6e 65 20 69 73 20 74 68 | 65 20 73 61 6d 65 20 61 |ne is th|e same a|
|00001170| 73 20 74 68 65 20 61 64 | 64 72 65 73 73 20 6f 66 |s the ad|dress of|
|00001180| 20 74 68 65 0d 20 55 6e | 69 6d 70 6c 65 6d 65 6e | the. Un|implemen|
|00001190| 74 65 64 20 74 72 61 70 | 2e 7d 0d 7b 31 2e 30 32 |ted trap|.}.{1.02|
|000011a0| 20 2d 20 4e 65 65 64 73 | 20 74 6f 20 62 65 20 63 | - Needs| to be c|
|000011b0| 61 6c 6c 65 64 20 61 66 | 74 65 72 20 63 61 6c 6c |alled af|ter call|
|000011c0| 20 74 6f 20 53 79 73 45 | 6e 76 69 72 6f 6e 73 20 | to SysE|nvirons |
|000011d0| 73 6f 20 74 68 61 74 20 | 69 74 20 63 61 6e 20 63 |so that |it can c|
|000011e0| 68 65 63 6b 0d 20 69 66 | 20 61 20 54 6f 6f 6c 54 |heck. if| a ToolT|
|000011f0| 72 61 70 20 69 73 20 6f | 75 74 20 6f 66 20 72 61 |rap is o|ut of ra|
|00001200| 6e 67 65 20 6f 66 20 61 | 20 70 72 65 2d 4d 61 63 |nge of a| pre-Mac|
|00001210| 49 49 20 52 4f 4d 2e 7d | 0d 0d 42 45 47 49 4e 0d |II ROM.}|..BEGIN.|
|00001220| 09 49 46 20 28 74 54 79 | 70 65 20 3d 20 54 6f 6f |.IF (tTy|pe = Too|
|00001230| 6c 54 72 61 70 29 20 26 | 0d 09 09 28 67 4d 61 63 |lTrap) &|...(gMac|
|00001240| 2e 6d 61 63 68 69 6e 65 | 54 79 70 65 20 3e 20 65 |.machine|Type > e|
|00001250| 6e 76 4d 61 63 68 55 6e | 6b 6e 6f 77 6e 29 20 26 |nvMachUn|known) &|
|00001260| 0d 09 09 28 67 4d 61 63 | 2e 6d 61 63 68 69 6e 65 |...(gMac|.machine|
|00001270| 54 79 70 65 20 3c 20 65 | 6e 76 4d 61 63 49 49 29 |Type < e|nvMacII)|
|00001280| 20 54 48 45 4e 20 42 45 | 47 49 4e 09 09 7b 69 74 | THEN BE|GIN..{it|
|00001290| 27 73 20 61 20 35 31 32 | 4b 45 2c 20 50 6c 75 73 |'s a 512|KE, Plus|
|000012a0| 2c 20 6f 72 20 53 45 7d | 0d 09 09 74 4e 75 6d 62 |, or SE}|...tNumb|
|000012b0| 65 72 20 3a 3d 20 42 41 | 4e 44 28 74 4e 75 6d 62 |er := BA|ND(tNumb|
|000012c0| 65 72 2c 20 24 30 33 46 | 46 29 3b 0d 09 09 49 46 |er, $03F|F);...IF|
|000012d0| 20 74 4e 75 6d 62 65 72 | 20 3e 20 24 30 31 46 46 | tNumber| > $01FF|
|000012e0| 20 54 48 45 4e 09 09 09 | 09 09 09 09 7b 77 68 69 | THEN...|....{whi|
|000012f0| 63 68 20 6d 65 61 6e 73 | 20 74 68 65 20 74 6f 6f |ch means| the too|
|00001300| 6c 20 74 72 61 70 73 7d | 0d 09 09 09 74 4e 75 6d |l traps}|....tNum|
|00001310| 62 65 72 20 3a 3d 20 5f | 55 6e 69 6d 70 6c 65 6d |ber := _|Unimplem|
|00001320| 65 6e 74 65 64 3b 09 09 | 09 09 09 7b 6f 6e 6c 79 |ented;..|...{only|
|00001330| 20 67 6f 20 74 6f 20 24 | 30 31 46 46 7d 0d 09 45 | go to $|01FF}..E|
|00001340| 4e 44 3b 0d 09 54 72 61 | 70 41 76 61 69 6c 61 62 |ND;..Tra|pAvailab|
|00001350| 6c 65 20 3a 3d 20 4e 47 | 65 74 54 72 61 70 41 64 |le := NG|etTrapAd|
|00001360| 64 72 65 73 73 28 74 4e | 75 6d 62 65 72 2c 20 74 |dress(tN|umber, t|
|00001370| 54 79 70 65 29 20 3c 3e | 0d 09 09 09 09 09 09 47 |Type) <>|.......G|
|00001380| 65 74 54 72 61 70 41 64 | 64 72 65 73 73 28 5f 55 |etTrapAd|dress(_U|
|00001390| 6e 69 6d 70 6c 65 6d 65 | 6e 74 65 64 29 3b 0d 45 |nimpleme|nted);.E|
|000013a0| 4e 44 3b 20 7b 54 72 61 | 70 41 76 61 69 6c 61 62 |ND; {Tra|pAvailab|
|000013b0| 6c 65 7d 0d 0d 0d 7b 24 | 53 20 4d 61 69 6e 7d 0d |le}...{$|S Main}.|
|000013c0| 50 52 4f 43 45 44 55 52 | 45 20 46 61 69 6c 4f 53 |PROCEDUR|E FailOS|
|000013d0| 45 72 72 4d 73 67 28 72 | 65 73 75 6c 74 2c 20 6d |ErrMsg(r|esult, m|
|000013e0| 65 73 73 61 67 65 3a 20 | 49 4e 54 45 47 45 52 29 |essage: |INTEGER)|
|000013f0| 3b 0d 42 45 47 49 4e 0d | 09 49 46 20 72 65 73 75 |;.BEGIN.|.IF resu|
|00001400| 6c 74 20 3c 3e 20 6e 6f | 45 72 72 20 54 48 45 4e |lt <> no|Err THEN|
|00001410| 0d 09 09 46 61 69 6c 75 | 72 65 28 72 65 73 75 6c |...Failu|re(resul|
|00001420| 74 2c 20 6d 65 73 73 61 | 67 65 29 3b 0d 45 4e 44 |t, messa|ge);.END|
|00001430| 3b 20 7b 53 69 67 6e 61 | 6c 4f 53 45 72 72 4d 73 |; {Signa|lOSErrMs|
|00001440| 67 7d 0d 0d 0d 7b 24 53 | 20 4d 61 69 6e 7d 0d 50 |g}...{$S| Main}.P|
|00001450| 52 4f 43 45 44 55 52 45 | 20 46 61 69 6c 4e 49 4c |ROCEDURE| FailNIL|
|00001460| 4d 73 67 28 70 3a 20 55 | 4e 49 56 20 50 74 72 3b |Msg(p: U|NIV Ptr;|
|00001470| 20 6d 65 73 73 61 67 65 | 3a 20 49 4e 54 45 47 45 | message|: INTEGE|
|00001480| 52 29 3b 0d 42 45 47 49 | 4e 0d 09 49 46 20 70 20 |R);.BEGI|N..IF p |
|00001490| 3d 20 4e 49 4c 20 54 48 | 45 4e 0d 09 09 46 61 69 |= NIL TH|EN...Fai|
|000014a0| 6c 75 72 65 28 6d 65 6d | 46 75 6c 6c 45 72 72 2c |lure(mem|FullErr,|
|000014b0| 20 6d 65 73 73 61 67 65 | 29 3b 0d 45 4e 44 3b 20 | message|);.END; |
|000014c0| 7b 46 61 69 6c 4e 49 4c | 4d 73 67 7d 0d 0d 0d 7b |{FailNIL|Msg}...{|
|000014d0| 24 53 20 4d 61 69 6e 7d | 0d 50 52 4f 43 45 44 55 |$S Main}|.PROCEDU|
|000014e0| 52 45 20 41 6c 65 72 74 | 55 73 65 72 28 65 72 72 |RE Alert|User(err|
|000014f0| 6f 72 3a 20 49 4e 54 45 | 47 45 52 3b 20 6d 65 73 |or: INTE|GER; mes|
|00001500| 73 61 67 65 3a 20 4c 6f | 6e 67 49 6e 74 29 3b 0d |sage: Lo|ngInt);.|
|00001510| 0d 7b 44 69 73 70 6c 61 | 79 20 61 6e 20 61 6c 65 |.{Displa|y an ale|
|00001520| 72 74 20 74 6f 20 69 6e | 66 6f 72 6d 20 74 68 65 |rt to in|form the|
|00001530| 20 75 73 65 72 20 6f 66 | 20 61 6e 20 65 72 72 6f | user of| an erro|
|00001540| 72 2e 20 4d 65 73 73 61 | 67 65 20 61 63 74 73 20 |r. Messa|ge acts |
|00001550| 61 73 20 61 6e 0d 20 69 | 6e 64 65 78 20 69 6e 74 |as an. i|ndex int|
|00001560| 6f 20 61 20 53 54 52 23 | 20 72 65 73 6f 75 72 63 |o a STR#| resourc|
|00001570| 65 20 6f 66 20 65 72 72 | 6f 72 20 6d 65 73 73 61 |e of err|or messa|
|00001580| 67 65 73 2e 20 49 66 20 | 6e 6f 20 6d 65 73 73 61 |ges. If |no messa|
|00001590| 67 65 20 69 73 20 67 69 | 76 65 6e 2c 0d 20 69 2e |ge is gi|ven,. i.|
|000015a0| 65 2e 20 3d 20 30 2c 20 | 74 68 65 6e 20 75 73 65 |e. = 0, |then use|
|000015b0| 20 61 20 73 74 61 6e 64 | 61 72 64 20 6d 65 73 73 | a stand|ard mess|
|000015c0| 61 67 65 2e 20 49 66 20 | 65 72 72 6f 72 20 69 73 |age. If |error is|
|000015d0| 20 6e 6f 74 20 6e 6f 45 | 72 72 20 74 68 65 6e 0d | not noE|rr then.|
|000015e0| 20 64 69 73 70 6c 61 79 | 20 69 74 20 61 73 20 77 | display| it as w|
|000015f0| 65 6c 6c 2e 7d 0d 0d 56 | 41 52 0d 09 6d 73 67 31 |ell.}..V|AR..msg1|
|00001600| 2c 20 6d 73 67 32 09 3a | 20 53 74 72 32 35 35 3b |, msg2.:| Str255;|
|00001610| 0d 09 69 74 65 6d 48 69 | 74 09 09 3a 20 49 4e 54 |..itemHi|t..: INT|
|00001620| 45 47 45 52 3b 0d 42 45 | 47 49 4e 0d 09 49 46 20 |EGER;.BE|GIN..IF |
|00001630| 6d 65 73 73 61 67 65 20 | 3c 3d 20 30 20 54 48 45 |message |<= 0 THE|
|00001640| 4e 20 6d 65 73 73 61 67 | 65 20 3a 3d 20 65 53 74 |N messag|e := eSt|
|00001650| 61 6e 64 61 72 64 45 72 | 72 3b 0d 09 47 65 74 49 |andardEr|r;..GetI|
|00001660| 6e 64 53 74 72 69 6e 67 | 28 6d 73 67 31 2c 20 73 |ndString|(msg1, s|
|00001670| 45 72 72 53 74 72 69 6e | 67 73 2c 20 6d 65 73 73 |ErrStrin|gs, mess|
|00001680| 61 67 65 29 3b 0d 09 49 | 46 20 65 72 72 6f 72 20 |age);..I|F error |
|00001690| 3d 20 6e 6f 45 72 72 20 | 54 48 45 4e 0d 09 09 6d |= noErr |THEN...m|
|000016a0| 73 67 32 20 3a 3d 20 27 | 27 0d 09 45 4c 53 45 0d |sg2 := '|'..ELSE.|
|000016b0| 09 09 4e 75 6d 54 6f 53 | 74 72 69 6e 67 28 65 72 |..NumToS|tring(er|
|000016c0| 72 6f 72 2c 20 6d 73 67 | 32 29 3b 0d 09 50 61 72 |ror, msg|2);..Par|
|000016d0| 61 6d 54 65 78 74 28 6d | 73 67 31 2c 20 6d 73 67 |amText(m|sg1, msg|
|000016e0| 32 2c 20 27 27 2c 20 27 | 27 29 3b 0d 09 69 74 65 |2, '', '|');..ite|
|000016f0| 6d 48 69 74 20 3a 3d 20 | 41 6c 65 72 74 28 72 55 |mHit := |Alert(rU|
|00001700| 73 65 72 41 6c 65 72 74 | 2c 20 4e 49 4c 29 3b 0d |serAlert|, NIL);.|
|00001710| 45 4e 44 3b 20 7b 41 6c | 65 72 74 55 73 65 72 7d |END; {Al|ertUser}|
|00001720| 0d 0d 0d 7b 24 53 20 4d | 61 69 6e 7d 0d 46 55 4e |...{$S M|ain}.FUN|
|00001730| 43 54 49 4f 4e 20 49 73 | 44 41 57 69 6e 64 6f 77 |CTION Is|DAWindow|
|00001740| 28 77 69 6e 64 6f 77 3a | 20 57 69 6e 64 6f 77 50 |(window:| WindowP|
|00001750| 74 72 29 3a 20 42 4f 4f | 4c 45 41 4e 3b 0d 42 45 |tr): BOO|LEAN;.BE|
|00001760| 47 49 4e 0d 09 49 46 20 | 77 69 6e 64 6f 77 20 3d |GIN..IF |window =|
|00001770| 20 4e 49 4c 20 54 48 45 | 4e 0d 09 09 49 73 44 41 | NIL THE|N...IsDA|
|00001780| 57 69 6e 64 6f 77 20 3a | 3d 20 46 41 4c 53 45 0d |Window :|= FALSE.|
|00001790| 09 45 4c 53 45 09 7b 44 | 41 20 77 69 6e 64 6f 77 |.ELSE.{D|A window|
|000017a0| 73 20 68 61 76 65 20 6e | 65 67 61 74 69 76 65 20 |s have n|egative |
|000017b0| 77 69 6e 64 6f 77 4b 69 | 6e 64 73 7d 0d 09 09 49 |windowKi|nds}...I|
|000017c0| 73 44 41 57 69 6e 64 6f | 77 20 3a 3d 20 57 69 6e |sDAWindo|w := Win|
|000017d0| 64 6f 77 50 65 65 6b 28 | 77 69 6e 64 6f 77 29 5e |dowPeek(|window)^|
|000017e0| 2e 77 69 6e 64 6f 77 4b | 69 6e 64 20 3c 20 30 3b |.windowK|ind < 0;|
|000017f0| 0d 45 4e 44 3b 20 7b 49 | 73 44 41 57 69 6e 64 6f |.END; {I|sDAWindo|
|00001800| 77 7d 0d 0d 0d 7b 24 53 | 20 4d 61 69 6e 7d 0d 46 |w}...{$S| Main}.F|
|00001810| 55 4e 43 54 49 4f 4e 20 | 49 73 41 70 70 57 69 6e |UNCTION |IsAppWin|
|00001820| 64 6f 77 28 77 69 6e 64 | 6f 77 3a 20 57 69 6e 64 |dow(wind|ow: Wind|
|00001830| 6f 77 50 74 72 29 3a 20 | 42 4f 4f 4c 45 41 4e 3b |owPtr): |BOOLEAN;|
|00001840| 0d 42 45 47 49 4e 0d 09 | 49 46 20 77 69 6e 64 6f |.BEGIN..|IF windo|
|00001850| 77 20 3d 20 4e 49 4c 20 | 54 48 45 4e 0d 09 09 49 |w = NIL |THEN...I|
|00001860| 73 41 70 70 57 69 6e 64 | 6f 77 20 3a 3d 20 46 41 |sAppWind|ow := FA|
|00001870| 4c 53 45 0d 09 45 4c 53 | 45 09 7b 61 70 70 6c 69 |LSE..ELS|E.{appli|
|00001880| 63 61 74 69 6f 6e 20 77 | 69 6e 64 6f 77 73 20 68 |cation w|indows h|
|00001890| 61 76 65 20 77 69 6e 64 | 6f 77 4b 69 6e 64 73 20 |ave wind|owKinds |
|000018a0| 3e 3d 20 75 73 65 72 4b | 69 6e 64 20 28 38 29 20 |>= userK|ind (8) |
|000018b0| 6f 72 20 64 69 61 6c 6f | 67 4b 69 6e 64 20 28 32 |or dialo|gKind (2|
|000018c0| 29 7d 0d 09 09 57 49 54 | 48 20 57 69 6e 64 6f 77 |)}...WIT|H Window|
|000018d0| 50 65 65 6b 28 77 69 6e | 64 6f 77 29 5e 20 44 4f |Peek(win|dow)^ DO|
|000018e0| 0d 09 09 09 49 73 41 70 | 70 57 69 6e 64 6f 77 20 |....IsAp|pWindow |
|000018f0| 3a 3d 20 28 77 69 6e 64 | 6f 77 4b 69 6e 64 20 3e |:= (wind|owKind >|
|00001900| 3d 20 75 73 65 72 4b 69 | 6e 64 29 20 7c 20 28 77 |= userKi|nd) | (w|
|00001910| 69 6e 64 6f 77 4b 69 6e | 64 20 3d 20 64 69 61 6c |indowKin|d = dial|
|00001920| 6f 67 4b 69 6e 64 29 3b | 0d 45 4e 44 3b 20 7b 49 |ogKind);|.END; {I|
|00001930| 73 41 70 70 57 69 6e 64 | 6f 77 7d 0d 0d 0d 7b 24 |sAppWind|ow}...{$|
|00001940| 53 20 4d 61 69 6e 7d 0d | 50 52 4f 43 45 44 55 52 |S Main}.|PROCEDUR|
|00001950| 45 20 42 75 69 6c 64 5a | 6f 6e 65 4c 69 73 74 3b |E BuildZ|oneList;|
|00001960| 0d 0d 7b 43 72 65 61 74 | 65 20 74 68 65 20 6c 69 |..{Creat|e the li|
|00001970| 73 74 20 6f 66 20 7a 6f | 6e 65 73 20 6f 6e 20 74 |st of zo|nes on t|
|00001980| 68 65 20 6e 65 74 77 6f | 72 6b 2e 20 46 69 6e 64 |he netwo|rk. Find|
|00001990| 20 61 20 62 72 69 64 67 | 65 20 74 6f 20 74 61 6c | a bridg|e to tal|
|000019a0| 6b 20 74 6f 20 2c 20 69 | 66 20 6f 6e 65 20 69 73 |k to , i|f one is|
|000019b0| 0d 20 70 72 65 73 65 6e | 74 2c 20 74 68 65 6e 20 |. presen|t, then |
|000019c0| 61 73 6b 20 69 74 20 66 | 6f 72 20 7a 6f 6e 65 20 |ask it f|or zone |
|000019d0| 6e 61 6d 65 73 2e 20 41 | 64 64 20 74 68 65 20 6e |names. A|dd the n|
|000019e0| 61 6d 65 73 20 74 6f 20 | 74 68 65 20 6c 69 73 74 |ames to |the list|
|000019f0| 20 69 6e 20 74 68 65 20 | 64 69 61 6c 6f 67 2e 7d | in the |dialog.}|
|00001a00| 0d 0d 56 41 52 0d 09 64 | 41 54 50 50 42 70 74 72 |..VAR..d|ATPPBptr|
|00001a10| 09 09 09 09 09 3a 20 41 | 54 50 50 42 70 74 72 3b |.....: A|TPPBptr;|
|00001a20| 09 09 7b 74 68 65 20 70 | 61 72 61 6d 65 74 65 72 |..{the p|arameter|
|00001a30| 20 62 6c 6f 63 6b 20 66 | 6f 72 20 47 65 74 5a 6f | block f|or GetZo|
|00001a40| 6e 65 4c 69 73 74 20 63 | 61 6c 6c 7d 0d 09 64 42 |neList c|all}..dB|
|00001a50| 44 53 09 09 09 09 09 09 | 3a 20 42 44 53 45 6c 65 |DS......|: BDSEle|
|00001a60| 6d 65 6e 74 3b 09 7b 74 | 68 65 20 42 44 53 20 66 |ment;.{t|he BDS f|
|00001a70| 6f 72 20 47 65 74 5a 6f | 6e 65 4c 69 73 74 20 63 |or GetZo|neList c|
|00001a80| 61 6c 6c 7d 0d 09 64 5a | 6f 6e 65 73 2c 20 64 43 |all}..dZ|ones, dC|
|00001a90| 75 72 72 09 09 09 09 3a | 20 50 74 72 3b 09 09 09 |urr....:| Ptr;...|
|00001aa0| 7b 74 68 65 20 64 61 74 | 61 20 62 75 66 66 65 72 |{the dat|a buffer|
|00001ab0| 20 66 6f 72 20 47 65 74 | 5a 6f 6e 65 4c 69 73 74 | for Get|ZoneList|
|00001ac0| 20 63 61 6c 6c 7d 0d 09 | 64 49 6e 64 65 78 2c 20 | call}..|dIndex, |
|00001ad0| 64 43 6f 75 6e 74 2c 20 | 64 4e 6f 64 65 2c 20 64 |dCount, |dNode, d|
|00001ae0| 4e 65 74 09 3a 20 49 4e | 54 45 47 45 52 3b 0d 09 |Net.: IN|TEGER;..|
|00001af0| 69 67 6e 6f 72 65 09 09 | 09 09 09 09 3a 20 49 4e |ignore..|....: IN|
|00001b00| 54 45 47 45 52 3b 0d 09 | 63 53 69 7a 65 09 09 09 |TEGER;..|cSize...|
|00001b10| 09 09 09 3a 20 50 6f 69 | 6e 74 3b 0d 09 66 69 09 |...: Poi|nt;..fi.|
|00001b20| 09 09 09 09 09 09 3a 20 | 46 61 69 6c 49 6e 66 6f |......: |FailInfo|
|00001b30| 3b 0d 09 6e 6f 64 65 4e | 65 74 41 64 64 72 65 73 |;..nodeN|etAddres|
|00001b40| 73 2c 20 62 72 69 64 67 | 65 4e 6f 64 65 09 3a 20 |s, bridg|eNode.: |
|00001b50| 49 4e 54 45 47 45 52 3b | 0d 0d 09 50 52 4f 43 45 |INTEGER;|...PROCE|
|00001b60| 44 55 52 45 20 43 6c 65 | 61 6e 55 70 3b 0d 09 42 |DURE Cle|anUp;..B|
|00001b70| 45 47 49 4e 0d 09 09 49 | 46 20 64 41 54 50 50 42 |EGIN...I|F dATPPB|
|00001b80| 70 74 72 20 3c 3e 20 4e | 49 4c 20 54 48 45 4e 0d |ptr <> N|IL THEN.|
|00001b90| 09 09 09 44 69 73 70 6f | 73 50 74 72 28 50 74 72 |...Dispo|sPtr(Ptr|
|00001ba0| 28 64 41 54 50 50 42 70 | 74 72 29 29 3b 09 09 09 |(dATPPBp|tr));...|
|00001bb0| 09 09 7b 67 65 74 20 72 | 69 64 20 6f 66 20 70 62 |..{get r|id of pb|
|00001bc0| 20 62 6c 6f 63 6b 7d 0d | 09 09 49 46 20 64 5a 6f | block}.|..IF dZo|
|00001bd0| 6e 65 73 20 3c 3e 20 4e | 49 4c 20 54 48 45 4e 0d |nes <> N|IL THEN.|
|00001be0| 09 09 09 44 69 73 70 6f | 73 50 74 72 28 64 5a 6f |...Dispo|sPtr(dZo|
|00001bf0| 6e 65 73 29 3b 09 09 09 | 09 09 09 09 7b 61 6e 64 |nes);...|....{and|
|00001c00| 20 62 75 66 66 65 72 7d | 0d 09 45 4e 44 3b 20 7b | buffer}|..END; {|
|00001c10| 43 6c 65 61 6e 55 70 7d | 0d 0d 09 50 52 4f 43 45 |CleanUp}|...PROCE|
|00001c20| 44 55 52 45 20 48 61 6e | 64 6c 65 45 72 72 28 65 |DURE Han|dleErr(e|
|00001c30| 72 72 6f 72 3a 20 49 4e | 54 45 47 45 52 3b 20 6d |rror: IN|TEGER; m|
|00001c40| 65 73 73 61 67 65 3a 20 | 4c 6f 6e 67 49 6e 74 29 |essage: |LongInt)|
|00001c50| 3b 0d 09 42 45 47 49 4e | 0d 09 09 43 6c 65 61 6e |;..BEGIN|...Clean|
|00001c60| 55 70 3b 09 09 09 09 09 | 09 09 09 09 09 7b 67 65 |Up;.....|.....{ge|
|00001c70| 74 20 72 69 64 20 6f 66 | 20 61 6c 6c 6f 63 61 74 |t rid of| allocat|
|00001c80| 65 64 20 6a 75 6e 6b 7d | 0d 09 45 4e 44 3b 0d 0d |ed junk}|..END;..|
|00001c90| 42 45 47 49 4e 0d 09 64 | 41 54 50 50 42 70 74 72 |BEGIN..d|ATPPBptr|
|00001ca0| 20 3a 3d 20 4e 49 4c 3b | 09 09 09 09 09 09 09 09 | := NIL;|........|
|00001cb0| 09 7b 69 6e 69 74 20 73 | 6f 6d 65 20 69 6d 70 6f |.{init s|ome impo|
|00001cc0| 72 74 61 6e 74 20 76 61 | 72 69 61 62 6c 65 73 7d |rtant va|riables}|
|00001cd0| 0d 09 64 5a 6f 6e 65 73 | 20 3a 3d 20 4e 49 4c 3b |..dZones| := NIL;|
|00001ce0| 0d 09 43 61 74 63 68 46 | 61 69 6c 75 72 65 73 28 |..CatchF|ailures(|
|00001cf0| 66 69 2c 20 48 61 6e 64 | 6c 65 45 72 72 29 3b 0d |fi, Hand|leErr);.|
|00001d00| 0d 09 7b 20 67 65 74 20 | 6e 65 74 77 6f 72 6b 20 |..{ get |network |
|00001d10| 61 64 64 72 65 73 73 20 | 6f 66 20 6e 6f 64 65 20 |address |of node |
|00001d20| 26 20 6e 6f 64 65 20 49 | 44 20 6f 66 20 62 72 69 |& node I|D of bri|
|00001d30| 64 67 65 20 28 69 66 20 | 61 6e 79 29 20 7d 0d 09 |dge (if |any) }..|
|00001d40| 46 61 69 6c 4f 53 45 72 | 72 4d 73 67 28 47 65 74 |FailOSEr|rMsg(Get|
|00001d50| 4e 6f 64 65 41 64 64 72 | 65 73 73 28 69 67 6e 6f |NodeAddr|ess(igno|
|00001d60| 72 65 2c 20 6e 6f 64 65 | 4e 65 74 41 64 64 72 65 |re, node|NetAddre|
|00001d70| 73 73 29 2c 20 65 41 70 | 70 6c 65 54 61 6c 6b 29 |ss), eAp|pleTalk)|
|00001d80| 3b 0d 09 62 72 69 64 67 | 65 4e 6f 64 65 20 3a 3d |;..bridg|eNode :=|
|00001d90| 20 47 65 74 42 72 69 64 | 67 65 41 64 64 72 65 73 | GetBrid|geAddres|
|00001da0| 73 3b 0d 0d 09 7b 20 74 | 65 73 74 20 74 6f 20 73 |s;...{ t|est to s|
|00001db0| 65 65 20 69 66 20 62 72 | 69 64 67 65 20 6e 6f 64 |ee if br|idge nod|
|00001dc0| 65 20 66 61 69 6c 73 2e | 20 20 49 66 20 73 6f 2c |e fails.| If so,|
|00001dd0| 20 6e 6f 20 69 6e 74 65 | 72 6e 65 74 2e 20 7d 0d | no inte|rnet. }.|
|00001de0| 09 69 66 20 28 62 72 69 | 64 67 65 4e 6f 64 65 20 |.if (bri|dgeNode |
|00001df0| 3d 20 30 29 20 74 68 65 | 6e 0d 09 09 46 61 69 6c |= 0) the|n...Fail|
|00001e00| 75 72 65 28 30 2c 20 65 | 4e 6f 5a 6f 6e 65 73 29 |ure(0, e|NoZones)|
|00001e10| 3b 09 09 09 09 09 09 09 | 09 09 7b 20 62 61 69 6c |;.......|..{ bail|
|00001e20| 20 69 66 20 6e 6f 20 7a | 6f 6e 65 73 20 70 72 65 | if no z|ones pre|
|00001e30| 73 65 6e 74 20 7d 0d 0d | 09 64 41 54 50 50 42 70 |sent }..|.dATPPBp|
|00001e40| 74 72 20 3a 3d 20 41 54 | 50 50 42 70 74 72 28 4e |tr := AT|PPBptr(N|
|00001e50| 65 77 50 74 72 28 53 49 | 5a 45 4f 46 28 41 54 50 |ewPtr(SI|ZEOF(ATP|
|00001e60| 50 61 72 61 6d 42 6c 6f | 63 6b 29 29 29 3b 0d 09 |ParamBlo|ck)));..|
|00001e70| 46 61 69 6c 4e 49 4c 4d | 73 67 28 64 41 54 50 50 |FailNILM|sg(dATPP|
|00001e80| 42 70 74 72 2c 20 65 4e | 6f 4d 65 6d 6f 72 79 29 |Bptr, eN|oMemory)|
|00001e90| 3b 0d 09 64 5a 6f 6e 65 | 73 20 3a 3d 20 4e 65 77 |;..dZone|s := New|
|00001ea0| 50 74 72 28 6b 5a 6f 6e | 65 73 53 69 7a 65 29 3b |Ptr(kZon|esSize);|
|00001eb0| 0d 09 46 61 69 6c 4e 49 | 4c 4d 73 67 28 64 5a 6f |..FailNI|LMsg(dZo|
|00001ec0| 6e 65 73 2c 20 65 4e 6f | 4d 65 6d 6f 72 79 29 3b |nes, eNo|Memory);|
|00001ed0| 0d 09 57 49 54 48 20 64 | 42 44 53 20 44 4f 20 42 |..WITH d|BDS DO B|
|00001ee0| 45 47 49 4e 09 09 09 09 | 09 09 09 09 09 7b 73 65 |EGIN....|.....{se|
|00001ef0| 74 20 75 70 20 42 44 53 | 7d 0d 09 09 62 75 66 66 |t up BDS|}...buff|
|00001f00| 53 69 7a 65 20 3a 3d 20 | 6b 5a 6f 6e 65 73 53 69 |Size := |kZonesSi|
|00001f10| 7a 65 3b 0d 09 09 62 75 | 66 66 50 74 72 20 3a 3d |ze;...bu|ffPtr :=|
|00001f20| 20 64 5a 6f 6e 65 73 3b | 0d 09 09 45 4e 44 3b 0d | dZones;|...END;.|
|00001f30| 09 57 49 54 48 20 64 41 | 54 50 50 42 70 74 72 5e |.WITH dA|TPPBptr^|
|00001f40| 20 44 4f 20 42 45 47 49 | 4e 09 09 09 09 09 09 09 | DO BEGI|N.......|
|00001f50| 7b 73 65 74 20 75 70 20 | 70 62 20 62 6c 6f 63 6b |{set up |pb block|
|00001f60| 7d 0d 09 09 61 74 70 46 | 6c 61 67 73 20 3a 3d 20 |}...atpF|lags := |
|00001f70| 30 3b 0d 0d 09 09 61 64 | 64 72 42 6c 6f 63 6b 2e |0;....ad|drBlock.|
|00001f80| 61 4e 65 74 20 3a 3d 20 | 6e 6f 64 65 4e 65 74 41 |aNet := |nodeNetA|
|00001f90| 64 64 72 65 73 73 3b 0d | 09 09 61 64 64 72 42 6c |ddress;.|..addrBl|
|00001fa0| 6f 63 6b 2e 61 4e 6f 64 | 65 20 3a 3d 20 62 72 69 |ock.aNod|e := bri|
|00001fb0| 64 67 65 4e 6f 64 65 3b | 09 09 09 09 09 7b 67 65 |dgeNode;|.....{ge|
|00001fc0| 74 20 6e 6f 64 65 20 6f | 66 20 62 72 69 64 67 65 |t node o|f bridge|
|00001fd0| 7d 0d 09 09 61 64 64 72 | 42 6c 6f 63 6b 2e 61 53 |}...addr|Block.aS|
|00001fe0| 6f 63 6b 65 74 20 3a 3d | 20 6b 5a 49 50 53 6f 63 |ocket :=| kZIPSoc|
|00001ff0| 6b 65 74 3b 09 09 09 09 | 7b 74 68 65 20 73 6f 63 |ket;....|{the soc|
|00002000| 6b 65 74 20 77 65 20 77 | 61 6e 74 7d 0d 09 09 72 |ket we w|ant}...r|
|00002010| 65 71 4c 65 6e 67 74 68 | 20 3a 3d 20 30 3b 0d 09 |eqLength| := 0;..|
|00002020| 09 72 65 71 50 6f 69 6e | 74 65 72 20 3a 3d 20 4e |.reqPoin|ter := N|
|00002030| 49 4c 3b 0d 09 09 62 64 | 73 50 6f 69 6e 74 65 72 |IL;...bd|sPointer|
|00002040| 20 3a 3d 20 40 64 42 44 | 53 3b 0d 09 09 6e 75 6d | := @dBD|S;...num|
|00002050| 4f 66 42 75 66 66 73 20 | 3a 3d 20 31 3b 0d 09 09 |OfBuffs |:= 1;...|
|00002060| 74 69 6d 65 4f 75 74 56 | 61 6c 20 3a 3d 20 6b 41 |timeOutV|al := kA|
|00002070| 54 50 54 69 6d 65 4f 75 | 74 56 61 6c 3b 0d 09 09 |TPTimeOu|tVal;...|
|00002080| 72 65 74 72 79 43 6f 75 | 6e 74 20 3a 3d 20 6b 41 |retryCou|nt := kA|
|00002090| 54 50 52 65 74 72 79 43 | 6f 75 6e 74 3b 0d 09 09 |TPRetryC|ount;...|
|000020a0| 45 4e 44 3b 0d 09 64 49 | 6e 64 65 78 20 3a 3d 20 |END;..dI|ndex := |
|000020b0| 31 3b 0d 09 64 43 6f 75 | 6e 74 20 3a 3d 20 30 3b |1;..dCou|nt := 0;|
|000020c0| 0d 09 53 65 74 50 74 28 | 63 53 69 7a 65 2c 20 30 |..SetPt(|cSize, 0|
|000020d0| 2c 20 30 29 3b 09 09 09 | 09 09 09 09 09 09 7b 77 |, 0);...|......{w|
|000020e0| 65 20 61 6c 77 61 79 73 | 20 73 74 75 66 66 20 69 |e always| stuff i|
|000020f0| 6e 74 6f 20 66 69 72 73 | 74 7d 0d 09 52 45 50 45 |nto firs|t}..REPE|
|00002100| 41 54 0d 09 09 64 41 54 | 50 50 42 70 74 72 5e 2e |AT...dAT|PPBptr^.|
|00002110| 75 73 65 72 44 61 74 61 | 20 3a 3d 20 6b 47 5a 4c |userData| := kGZL|
|00002120| 43 61 6c 6c 20 2b 20 64 | 49 6e 64 65 78 3b 09 09 |Call + d|Index;..|
|00002130| 7b 69 6e 64 69 63 61 74 | 65 20 47 65 74 5a 6f 6e |{indicat|e GetZon|
|00002140| 65 4c 69 73 74 20 72 65 | 71 75 65 73 74 7d 0d 09 |eList re|quest}..|
|00002150| 09 46 61 69 6c 4f 53 45 | 72 72 4d 73 67 28 50 53 |.FailOSE|rrMsg(PS|
|00002160| 65 6e 64 52 65 71 75 65 | 73 74 28 64 41 54 50 50 |endReque|st(dATPP|
|00002170| 42 70 74 72 2c 0d 09 09 | 09 46 41 4c 53 45 29 2c |Bptr,...|.FALSE),|
|00002180| 20 65 41 70 70 6c 65 54 | 61 6c 6b 29 3b 09 09 09 | eAppleT|alk);...|
|00002190| 09 09 09 7b 73 65 6e 64 | 20 73 79 6e 63 20 72 65 |...{send| sync re|
|000021a0| 71 75 65 73 74 7d 0d 09 | 09 64 43 6f 75 6e 74 20 |quest}..|.dCount |
|000021b0| 3a 3d 20 64 43 6f 75 6e | 74 20 2b 20 42 41 4e 44 |:= dCoun|t + BAND|
|000021c0| 28 64 42 44 53 2e 75 73 | 65 72 42 79 74 65 73 2c |(dBDS.us|erBytes,|
|000021d0| 0d 09 09 09 09 09 6b 5a | 6f 6e 65 43 6f 75 6e 74 |......kZ|oneCount|
|000021e0| 29 3b 09 09 09 09 09 09 | 7b 66 69 6e 64 20 6f 75 |);......|{find ou|
|000021f0| 74 20 68 6f 77 20 6d 61 | 6e 79 20 72 65 74 75 72 |t how ma|ny retur|
|00002200| 6e 65 64 7d 0d 09 09 64 | 43 75 72 72 20 3a 3d 20 |ned}...d|Curr := |
|00002210| 64 5a 6f 6e 65 73 3b 09 | 09 09 09 09 09 09 09 7b |dZones;.|.......{|
|00002220| 70 75 74 20 63 75 72 72 | 65 6e 74 20 70 6f 69 6e |put curr|ent poin|
|00002230| 74 65 72 20 61 74 20 73 | 74 61 72 74 7d 0d 09 09 |ter at s|tart}...|
|00002240| 52 45 50 45 41 54 09 09 | 09 09 09 09 09 09 09 09 |REPEAT..|........|
|00002250| 09 7b 67 65 74 20 65 61 | 63 68 20 7a 6f 6e 65 7d |.{get ea|ch zone}|
|00002260| 0d 09 09 09 69 67 6e 6f | 72 65 20 3a 3d 20 4c 41 |....igno|re := LA|
|00002270| 64 64 52 6f 77 28 31 2c | 20 30 2c 20 67 4c 69 73 |ddRow(1,| 0, gLis|
|00002280| 74 29 3b 09 09 09 09 7b | 63 72 65 61 74 65 20 6e |t);....{|create n|
|00002290| 65 77 20 63 65 6c 6c 20 | 61 74 20 73 74 61 72 74 |ew cell |at start|
|000022a0| 7d 0d 09 09 09 4c 53 65 | 74 43 65 6c 6c 28 50 4f |}....LSe|tCell(PO|
|000022b0| 49 4e 54 45 52 28 4f 52 | 44 34 28 64 43 75 72 72 |INTER(OR|D4(dCurr|
|000022c0| 29 20 2b 20 31 29 2c 20 | 64 43 75 72 72 5e 2c 0d |) + 1), |dCurr^,.|
|000022d0| 09 09 09 09 09 09 63 53 | 69 7a 65 2c 20 67 4c 69 |......cS|ize, gLi|
|000022e0| 73 74 29 3b 09 09 09 09 | 09 7b 73 74 75 66 66 20 |st);....|.{stuff |
|000022f0| 69 6e 20 7a 6f 6e 65 7d | 0d 09 09 09 64 43 75 72 |in zone}|....dCur|
|00002300| 72 20 3a 3d 20 50 4f 49 | 4e 54 45 52 28 4f 52 44 |r := POI|NTER(ORD|
|00002310| 34 28 64 43 75 72 72 29 | 20 2b 20 64 43 75 72 72 |4(dCurr)| + dCurr|
|00002320| 5e 2b 31 29 3b 09 7b 62 | 75 6d 70 20 75 70 20 63 |^+1);.{b|ump up c|
|00002330| 75 72 72 65 6e 74 20 70 | 6f 69 6e 74 65 72 7d 0d |urrent p|ointer}.|
|00002340| 09 09 09 64 49 6e 64 65 | 78 20 3a 3d 20 64 49 6e |...dInde|x := dIn|
|00002350| 64 65 78 20 2b 20 31 3b | 09 09 09 09 09 09 7b 69 |dex + 1;|......{i|
|00002360| 6e 63 72 65 6d 65 6e 74 | 20 77 68 69 63 68 20 7a |ncrement| which z|
|00002370| 6f 6e 65 7d 0d 09 09 55 | 4e 54 49 4c 20 64 49 6e |one}...U|NTIL dIn|
|00002380| 64 65 78 20 3e 20 64 43 | 6f 75 6e 74 3b 0d 09 55 |dex > dC|ount;..U|
|00002390| 4e 54 49 4c 20 28 42 41 | 4e 44 28 64 42 44 53 2e |NTIL (BA|ND(dBDS.|
|000023a0| 75 73 65 72 42 79 74 65 | 73 2c 20 6b 4d 6f 72 65 |userByte|s, kMore|
|000023b0| 5a 6f 6e 65 73 29 20 3c | 3e 20 30 29 3b 09 09 7b |Zones) <|> 0);..{|
|000023c0| 6b 65 65 70 20 67 6f 69 | 6e 67 20 75 6e 74 69 6c |keep goi|ng until|
|000023d0| 20 6e 6f 6e 65 20 6c 65 | 66 74 7d 0d 09 43 6c 65 | none le|ft}..Cle|
|000023e0| 61 6e 55 70 3b 0d 0d 09 | 53 75 63 63 65 73 73 28 |anUp;...|Success(|
|000023f0| 66 69 29 3b 0d 45 4e 44 | 3b 20 7b 42 75 69 6c 64 |fi);.END|; {Build|
|00002400| 5a 6f 6e 65 4c 69 73 74 | 7d 0d 0d 0d 7b 24 53 20 |ZoneList|}...{$S |
|00002410| 4d 61 69 6e 7d 0d 50 52 | 4f 43 45 44 55 52 45 20 |Main}.PR|OCEDURE |
|00002420| 42 75 69 6c 64 5a 6f 6e | 65 4c 69 73 74 50 68 61 |BuildZon|eListPha|
|00002430| 73 65 32 3b 0d 0d 7b 43 | 72 65 61 74 65 20 74 68 |se2;..{C|reate th|
|00002440| 65 20 6c 69 73 74 20 6f | 66 20 7a 6f 6e 65 73 20 |e list o|f zones |
|00002450| 6f 6e 20 74 68 65 20 6e | 65 74 77 6f 72 6b 2e 20 |on the n|etwork. |
|00002460| 46 69 6e 64 20 61 20 62 | 72 69 64 67 65 20 74 6f |Find a b|ridge to|
|00002470| 20 74 61 6c 6b 20 74 6f | 20 2c 20 69 66 20 6f 6e | talk to| , if on|
|00002480| 65 20 69 73 0d 20 70 72 | 65 73 65 6e 74 2c 20 74 |e is. pr|esent, t|
|00002490| 68 65 6e 20 61 73 6b 20 | 69 74 20 66 6f 72 20 7a |hen ask |it for z|
|000024a0| 6f 6e 65 20 6e 61 6d 65 | 73 2e 20 41 64 64 20 74 |one name|s. Add t|
|000024b0| 68 65 20 6e 61 6d 65 73 | 20 74 6f 20 74 68 65 20 |he names| to the |
|000024c0| 6c 69 73 74 20 69 6e 20 | 74 68 65 20 64 69 61 6c |list in |the dial|
|000024d0| 6f 67 2e 7d 0d 0d 56 41 | 52 0d 09 64 58 50 42 50 |og.}..VA|R..dXPBP|
|000024e0| 42 50 74 72 09 09 09 09 | 09 3a 20 78 43 61 6c 6c |BPtr....|.: xCall|
|000024f0| 50 61 72 61 6d 42 6c 6b | 50 74 72 3b 0d 09 64 42 |ParamBlk|Ptr;..dB|
|00002500| 44 53 09 09 09 09 09 09 | 3a 20 42 44 53 45 6c 65 |DS......|: BDSEle|
|00002510| 6d 65 6e 74 3b 09 7b 74 | 68 65 20 42 44 53 20 66 |ment;.{t|he BDS f|
|00002520| 6f 72 20 47 65 74 5a 6f | 6e 65 4c 69 73 74 20 63 |or GetZo|neList c|
|00002530| 61 6c 6c 7d 0d 09 64 5a | 6f 6e 65 73 2c 20 64 43 |all}..dZ|ones, dC|
|00002540| 75 72 72 09 09 09 09 3a | 20 50 74 72 3b 09 09 09 |urr....:| Ptr;...|
|00002550| 7b 74 68 65 20 64 61 74 | 61 20 62 75 66 66 65 72 |{the dat|a buffer|
|00002560| 20 66 6f 72 20 47 65 74 | 5a 6f 6e 65 4c 69 73 74 | for Get|ZoneList|
|00002570| 20 63 61 6c 6c 7d 0d 09 | 64 49 6e 64 65 78 2c 20 | call}..|dIndex, |
|00002580| 64 43 6f 75 6e 74 2c 20 | 64 4e 6f 64 65 2c 20 64 |dCount, |dNode, d|
|00002590| 4e 65 74 09 3a 20 49 4e | 54 45 47 45 52 3b 0d 09 |Net.: IN|TEGER;..|
|000025a0| 69 67 6e 6f 72 65 09 09 | 09 09 09 09 3a 20 49 4e |ignore..|....: IN|
|000025b0| 54 45 47 45 52 3b 0d 09 | 63 53 69 7a 65 09 09 09 |TEGER;..|cSize...|
|000025c0| 09 09 09 3a 20 50 6f 69 | 6e 74 3b 0d 09 66 69 09 |...: Poi|nt;..fi.|
|000025d0| 09 09 09 09 09 09 3a 20 | 46 61 69 6c 49 6e 66 6f |......: |FailInfo|
|000025e0| 3b 0d 09 78 70 70 44 72 | 69 76 65 72 52 65 66 4e |;..xppDr|iverRefN|
|000025f0| 75 6d 09 09 09 09 3a 20 | 49 4e 54 45 47 45 52 3b |um....: |INTEGER;|
|00002600| 0d 09 6e 6f 64 65 4e 65 | 74 41 64 64 72 65 73 73 |..nodeNe|tAddress|
|00002610| 2c 20 62 72 69 64 67 65 | 4e 6f 64 65 09 3a 20 49 |, bridge|Node.: I|
|00002620| 4e 54 45 47 45 52 3b 0d | 0d 09 50 52 4f 43 45 44 |NTEGER;.|..PROCED|
|00002630| 55 52 45 20 43 6c 65 61 | 6e 55 70 3b 0d 09 42 45 |URE Clea|nUp;..BE|
|00002640| 47 49 4e 0d 09 09 49 46 | 20 64 58 50 42 50 42 50 |GIN...IF| dXPBPBP|
|00002650| 74 72 20 3c 3e 20 4e 49 | 4c 20 54 48 45 4e 0d 09 |tr <> NI|L THEN..|
|00002660| 09 09 44 69 73 70 6f 73 | 50 74 72 28 50 74 72 28 |..Dispos|Ptr(Ptr(|
|00002670| 64 58 50 42 50 42 50 74 | 72 29 29 3b 09 09 09 09 |dXPBPBPt|r));....|
|00002680| 09 7b 67 65 74 20 72 69 | 64 20 6f 66 20 70 62 20 |.{get ri|d of pb |
|00002690| 62 6c 6f 63 6b 7d 0d 09 | 09 49 46 20 64 5a 6f 6e |block}..|.IF dZon|
|000026a0| 65 73 20 3c 3e 20 4e 49 | 4c 20 54 48 45 4e 0d 09 |es <> NI|L THEN..|
|000026b0| 09 09 44 69 73 70 6f 73 | 50 74 72 28 64 5a 6f 6e |..Dispos|Ptr(dZon|
|000026c0| 65 73 29 3b 09 09 09 09 | 09 09 09 7b 61 6e 64 20 |es);....|...{and |
|000026d0| 62 75 66 66 65 72 7d 0d | 09 45 4e 44 3b 20 7b 43 |buffer}.|.END; {C|
|000026e0| 6c 65 61 6e 55 70 7d 0d | 0d 09 50 52 4f 43 45 44 |leanUp}.|..PROCED|
|000026f0| 55 52 45 20 48 61 6e 64 | 6c 65 45 72 72 28 65 72 |URE Hand|leErr(er|
|00002700| 72 6f 72 3a 20 49 4e 54 | 45 47 45 52 3b 20 6d 65 |ror: INT|EGER; me|
|00002710| 73 73 61 67 65 3a 20 4c | 6f 6e 67 49 6e 74 29 3b |ssage: L|ongInt);|
|00002720| 0d 09 42 45 47 49 4e 0d | 09 09 43 6c 65 61 6e 55 |..BEGIN.|..CleanU|
|00002730| 70 3b 09 09 09 09 09 09 | 09 09 09 09 7b 67 65 74 |p;......|....{get|
|00002740| 20 72 69 64 20 6f 66 20 | 61 6c 6c 6f 63 61 74 65 | rid of |allocate|
|00002750| 64 20 6a 75 6e 6b 7d 0d | 09 45 4e 44 3b 0d 0d 42 |d junk}.|.END;..B|
|00002760| 45 47 49 4e 0d 09 64 58 | 50 42 50 42 50 74 72 20 |EGIN..dX|PBPBPtr |
|00002770| 3a 3d 20 4e 49 4c 3b 09 | 09 09 09 09 09 09 09 09 |:= NIL;.|........|
|00002780| 7b 69 6e 69 74 20 73 6f | 6d 65 20 69 6d 70 6f 72 |{init so|me impor|
|00002790| 74 61 6e 74 20 76 61 72 | 69 61 62 6c 65 73 7d 0d |tant var|iables}.|
|000027a0| 09 64 5a 6f 6e 65 73 20 | 3a 3d 20 4e 49 4c 3b 0d |.dZones |:= NIL;.|
|000027b0| 09 43 61 74 63 68 46 61 | 69 6c 75 72 65 73 28 66 |.CatchFa|ilures(f|
|000027c0| 69 2c 20 48 61 6e 64 6c | 65 45 72 72 29 3b 0d 0d |i, Handl|eErr);..|
|000027d0| 09 7b 20 67 65 74 20 6e | 65 74 77 6f 72 6b 20 61 |.{ get n|etwork a|
|000027e0| 64 64 72 65 73 73 20 6f | 66 20 6e 6f 64 65 20 26 |ddress o|f node &|
|000027f0| 20 6e 6f 64 65 20 49 44 | 20 6f 66 20 62 72 69 64 | node ID| of brid|
|00002800| 67 65 20 28 69 66 20 61 | 6e 79 29 20 7d 0d 09 46 |ge (if a|ny) }..F|
|00002810| 61 69 6c 4f 53 45 72 72 | 4d 73 67 28 47 65 74 4e |ailOSErr|Msg(GetN|
|00002820| 6f 64 65 41 64 64 72 65 | 73 73 28 69 67 6e 6f 72 |odeAddre|ss(ignor|
|00002830| 65 2c 20 6e 6f 64 65 4e | 65 74 41 64 64 72 65 73 |e, nodeN|etAddres|
|00002840| 73 29 2c 20 65 41 70 70 | 6c 65 54 61 6c 6b 29 3b |s), eApp|leTalk);|
|00002850| 0d 09 62 72 69 64 67 65 | 4e 6f 64 65 20 3a 3d 20 |..bridge|Node := |
|00002860| 47 65 74 42 72 69 64 67 | 65 41 64 64 72 65 73 73 |GetBridg|eAddress|
|00002870| 3b 0d 0d 09 7b 20 74 65 | 73 74 20 74 6f 20 73 65 |;...{ te|st to se|
|00002880| 65 20 69 66 20 65 69 74 | 68 65 72 20 6f 6e 65 20 |e if eit|her one |
|00002890| 66 61 69 6c 73 2e 20 20 | 49 66 20 73 6f 2c 20 6e |fails. |If so, n|
|000028a0| 6f 20 69 6e 74 65 72 6e | 65 74 2e 20 7d 0d 09 69 |o intern|et. }..i|
|000028b0| 66 20 28 6e 6f 64 65 4e | 65 74 41 64 64 72 65 73 |f (nodeN|etAddres|
|000028c0| 73 20 3d 20 30 29 20 6f | 72 20 28 62 72 69 64 67 |s = 0) o|r (bridg|
|000028d0| 65 4e 6f 64 65 20 3d 20 | 30 29 20 74 68 65 6e 0d |eNode = |0) then.|
|000028e0| 09 09 46 61 69 6c 75 72 | 65 28 30 2c 20 65 4e 6f |..Failur|e(0, eNo|
|000028f0| 5a 6f 6e 65 73 29 3b 09 | 09 09 09 09 09 09 09 09 |Zones);.|........|
|00002900| 7b 20 62 61 69 6c 20 69 | 66 20 6e 6f 20 7a 6f 6e |{ bail i|f no zon|
|00002910| 65 73 20 70 72 65 73 65 | 6e 74 20 7d 0d 0d 09 7b |es prese|nt }...{|
|00002920| 20 67 65 74 20 61 20 68 | 6f 6c 64 20 6f 66 20 74 | get a h|old of t|
|00002930| 68 65 20 58 50 50 20 64 | 72 69 76 65 72 20 72 65 |he XPP d|river re|
|00002940| 66 65 72 65 6e 63 65 20 | 6e 75 6d 62 65 72 2d 74 |ference |number-t|
|00002950| 68 69 73 20 69 73 20 74 | 68 65 20 73 61 66 65 73 |his is t|he safes|
|00002960| 74 20 77 61 79 20 7d 0d | 09 46 61 69 6c 4f 53 45 |t way }.|.FailOSE|
|00002970| 72 72 4d 73 67 28 4f 70 | 65 6e 44 72 69 76 65 72 |rrMsg(Op|enDriver|
|00002980| 28 27 2e 58 50 50 27 2c | 20 78 70 70 44 72 69 76 |('.XPP',| xppDriv|
|00002990| 65 72 52 65 66 4e 75 6d | 29 2c 20 65 41 70 70 6c |erRefNum|), eAppl|
|000029a0| 65 54 61 6c 6b 29 3b 0d | 0d 09 64 58 50 42 50 42 |eTalk);.|..dXPBPB|
|000029b0| 50 74 72 20 3a 3d 20 78 | 43 61 6c 6c 50 61 72 61 |Ptr := x|CallPara|
|000029c0| 6d 42 6c 6b 50 74 72 28 | 4e 65 77 50 74 72 28 53 |mBlkPtr(|NewPtr(S|
|000029d0| 49 5a 45 4f 46 28 78 43 | 61 6c 6c 50 61 72 61 6d |IZEOF(xC|allParam|
|000029e0| 29 29 29 3b 0d 09 46 61 | 69 6c 4e 49 4c 4d 73 67 |)));..Fa|ilNILMsg|
|000029f0| 28 64 58 50 42 50 42 50 | 74 72 2c 20 65 4e 6f 4d |(dXPBPBP|tr, eNoM|
|00002a00| 65 6d 6f 72 79 29 3b 0d | 09 64 5a 6f 6e 65 73 20 |emory);.|.dZones |
|00002a10| 3a 3d 20 4e 65 77 50 74 | 72 28 6b 5a 6f 6e 65 73 |:= NewPt|r(kZones|
|00002a20| 53 69 7a 65 29 3b 0d 09 | 46 61 69 6c 4e 49 4c 4d |Size);..|FailNILM|
|00002a30| 73 67 28 64 5a 6f 6e 65 | 73 2c 20 65 4e 6f 4d 65 |sg(dZone|s, eNoMe|
|00002a40| 6d 6f 72 79 29 3b 0d 0d | 09 64 58 50 42 50 42 50 |mory);..|.dXPBPBP|
|00002a50| 74 72 5e 2e 7a 69 70 49 | 6e 66 6f 46 69 65 6c 64 |tr^.zipI|nfoField|
|00002a60| 5b 31 5d 20 3a 3d 20 30 | 3b 09 7b 20 41 4c 57 41 |[1] := 0|;.{ ALWA|
|00002a70| 59 53 20 30 20 6f 6e 20 | 66 69 72 73 74 20 63 61 |YS 0 on |first ca|
|00002a80| 6c 6c 2e 20 20 68 61 73 | 20 73 74 61 74 65 20 69 |ll. has| state i|
|00002a90| 6e 66 6f 20 6f 6e 20 73 | 75 62 73 65 71 75 65 6e |nfo on s|ubsequen|
|00002aa0| 74 20 63 61 6c 6c 73 20 | 7d 0d 09 64 58 50 42 50 |t calls |}..dXPBP|
|00002ab0| 42 50 74 72 5e 2e 7a 69 | 70 49 6e 66 6f 46 69 65 |BPtr^.zi|pInfoFie|
|00002ac0| 6c 64 5b 32 5d 20 3a 3d | 20 30 3b 09 7b 20 41 4c |ld[2] :=| 0;.{ AL|
|00002ad0| 57 41 59 53 20 30 20 6f | 6e 20 66 69 72 73 74 20 |WAYS 0 o|n first |
|00002ae0| 63 61 6c 6c 2e 20 20 68 | 61 73 20 73 74 61 74 65 |call. h|as state|
|00002af0| 20 69 6e 66 6f 20 6f 6e | 20 73 75 62 73 65 71 75 | info on| subsequ|
|00002b00| 65 6e 74 20 63 61 6c 6c | 73 20 7d 0d 09 64 58 50 |ent call|s }..dXP|
|00002b10| 42 50 42 50 74 72 5e 2e | 7a 69 70 4c 61 73 74 46 |BPBPtr^.|zipLastF|
|00002b20| 6c 61 67 20 3a 3d 20 30 | 3b 0d 0d 09 64 58 50 42 |lag := 0|;...dXPB|
|00002b30| 50 42 50 74 72 5e 2e 69 | 6f 52 65 66 4e 75 6d 20 |PBPtr^.i|oRefNum |
|00002b40| 3a 3d 20 78 70 70 44 72 | 69 76 65 72 52 65 66 4e |:= xppDr|iverRefN|
|00002b50| 75 6d 3b 0d 09 64 58 50 | 42 50 42 50 74 72 5e 2e |um;..dXP|BPBPtr^.|
|00002b60| 63 73 43 6f 64 65 20 3a | 3d 20 78 43 61 6c 6c 3b |csCode :|= xCall;|
|00002b70| 0d 09 64 58 50 42 50 42 | 50 74 72 5e 2e 78 70 70 |..dXPBPB|Ptr^.xpp|
|00002b80| 53 75 62 43 6f 64 65 20 | 3a 3d 20 7a 69 70 47 65 |SubCode |:= zipGe|
|00002b90| 74 5a 6f 6e 65 4c 69 73 | 74 3b 0d 09 64 58 50 42 |tZoneLis|t;..dXPB|
|00002ba0| 50 42 50 74 72 5e 2e 78 | 70 70 54 69 6d 65 4f 75 |PBPtr^.x|ppTimeOu|
|00002bb0| 74 20 3a 3d 20 6b 41 54 | 50 54 69 6d 65 4f 75 74 |t := kAT|PTimeOut|
|00002bc0| 56 61 6c 3b 0d 09 64 58 | 50 42 50 42 50 74 72 5e |Val;..dX|PBPBPtr^|
|00002bd0| 2e 78 70 70 52 65 74 72 | 79 20 3a 3d 20 6b 41 54 |.xppRetr|y := kAT|
|00002be0| 50 52 65 74 72 79 43 6f | 75 6e 74 3b 0d 09 64 58 |PRetryCo|unt;..dX|
|00002bf0| 50 42 50 42 50 74 72 5e | 2e 7a 69 70 42 75 66 66 |PBPBPtr^|.zipBuff|
|00002c00| 50 74 72 20 3a 3d 20 50 | 74 72 28 20 64 5a 6f 6e |Ptr := P|tr( dZon|
|00002c10| 65 73 29 3b 0d 0d 09 64 | 49 6e 64 65 78 20 3a 3d |es);...d|Index :=|
|00002c20| 20 31 3b 0d 09 64 43 6f | 75 6e 74 20 3a 3d 20 30 | 1;..dCo|unt := 0|
|00002c30| 3b 0d 09 53 65 74 50 74 | 28 63 53 69 7a 65 2c 20 |;..SetPt|(cSize, |
|00002c40| 30 2c 20 30 29 3b 09 09 | 09 09 09 09 09 09 09 7b |0, 0);..|.......{|
|00002c50| 77 65 20 61 6c 77 61 79 | 73 20 73 74 75 66 66 20 |we alway|s stuff |
|00002c60| 69 6e 74 6f 20 66 69 72 | 73 74 7d 0d 09 52 45 50 |into fir|st}..REP|
|00002c70| 45 41 54 0d 09 09 46 61 | 69 6c 4f 53 45 72 72 4d |EAT...Fa|ilOSErrM|
|00002c80| 73 67 28 50 42 43 6f 6e | 74 72 6f 6c 28 50 61 72 |sg(PBCon|trol(Par|
|00002c90| 6d 42 6c 6b 50 74 72 20 | 28 64 58 50 42 50 42 50 |mBlkPtr |(dXPBPBP|
|00002ca0| 74 72 29 2c 20 66 61 6c | 73 65 29 2c 20 65 41 70 |tr), fal|se), eAp|
|00002cb0| 70 6c 65 54 61 6c 6b 29 | 3b 09 09 7b 20 73 65 6e |pleTalk)|;..{ sen|
|00002cc0| 64 20 73 79 6e 63 20 63 | 6f 6e 74 72 6f 6c 20 63 |d sync c|ontrol c|
|00002cd0| 61 6c 6c 20 7d 0d 09 09 | 64 43 6f 75 6e 74 20 3a |all }...|dCount :|
|00002ce0| 3d 20 64 43 6f 75 6e 74 | 20 2b 20 64 58 50 42 50 |= dCount| + dXPBP|
|00002cf0| 42 50 74 72 5e 2e 7a 69 | 70 4e 75 6d 5a 6f 6e 65 |BPtr^.zi|pNumZone|
|00002d00| 73 3b 09 09 09 09 09 09 | 7b 20 66 69 6e 64 20 6f |s;......|{ find o|
|00002d10| 75 74 20 68 6f 77 20 6d | 61 6e 79 20 72 65 74 75 |ut how m|any retu|
|00002d20| 72 6e 65 64 20 7d 0d 0d | 09 09 64 43 75 72 72 20 |rned }..|..dCurr |
|00002d30| 3a 3d 20 64 5a 6f 6e 65 | 73 3b 09 09 09 09 09 09 |:= dZone|s;......|
|00002d40| 09 09 7b 70 75 74 20 63 | 75 72 72 65 6e 74 20 70 |..{put c|urrent p|
|00002d50| 6f 69 6e 74 65 72 20 61 | 74 20 73 74 61 72 74 7d |ointer a|t start}|
|00002d60| 0d 09 09 52 45 50 45 41 | 54 09 09 09 09 09 09 09 |...REPEA|T.......|
|00002d70| 09 09 09 09 7b 67 65 74 | 20 65 61 63 68 20 7a 6f |....{get| each zo|
|00002d80| 6e 65 7d 0d 09 09 09 69 | 67 6e 6f 72 65 20 3a 3d |ne}....i|gnore :=|
|00002d90| 20 4c 41 64 64 52 6f 77 | 28 31 2c 20 30 2c 20 67 | LAddRow|(1, 0, g|
|00002da0| 4c 69 73 74 29 3b 09 09 | 09 09 7b 63 72 65 61 74 |List);..|..{creat|
|00002db0| 65 20 6e 65 77 20 63 65 | 6c 6c 20 61 74 20 73 74 |e new ce|ll at st|
|00002dc0| 61 72 74 7d 0d 09 09 09 | 4c 53 65 74 43 65 6c 6c |art}....|LSetCell|
|00002dd0| 28 50 4f 49 4e 54 45 52 | 28 4f 52 44 34 28 64 43 |(POINTER|(ORD4(dC|
|00002de0| 75 72 72 29 20 2b 20 31 | 29 2c 20 64 43 75 72 72 |urr) + 1|), dCurr|
|00002df0| 5e 2c 0d 09 09 09 09 63 | 53 69 7a 65 2c 20 67 4c |^,.....c|Size, gL|
|00002e00| 69 73 74 29 3b 09 09 09 | 09 09 09 09 7b 73 74 75 |ist);...|....{stu|
|00002e10| 66 66 20 69 6e 20 7a 6f | 6e 65 7d 0d 09 09 09 64 |ff in zo|ne}....d|
|00002e20| 43 75 72 72 20 3a 3d 20 | 50 4f 49 4e 54 45 52 28 |Curr := |POINTER(|
|00002e30| 4f 52 44 34 28 64 43 75 | 72 72 29 20 2b 20 64 43 |ORD4(dCu|rr) + dC|
|00002e40| 75 72 72 5e 2b 31 29 3b | 09 7b 62 75 6d 70 20 75 |urr^+1);|.{bump u|
|00002e50| 70 20 63 75 72 72 65 6e | 74 20 70 6f 69 6e 74 65 |p curren|t pointe|
|00002e60| 72 7d 0d 09 09 09 64 49 | 6e 64 65 78 20 3a 3d 20 |r}....dI|ndex := |
|00002e70| 64 49 6e 64 65 78 20 2b | 20 31 3b 09 09 09 09 09 |dIndex +| 1;.....|
|00002e80| 09 7b 69 6e 63 72 65 6d | 65 6e 74 20 77 68 69 63 |.{increm|ent whic|
|00002e90| 68 20 7a 6f 6e 65 7d 0d | 09 09 55 4e 54 49 4c 20 |h zone}.|..UNTIL |
|00002ea0| 64 49 6e 64 65 78 20 3e | 20 64 43 6f 75 6e 74 3b |dIndex >| dCount;|
|00002eb0| 0d 09 55 4e 54 49 4c 20 | 28 64 58 50 42 50 42 50 |..UNTIL |(dXPBPBP|
|00002ec0| 74 72 5e 2e 7a 69 70 4c | 61 73 74 46 6c 61 67 20 |tr^.zipL|astFlag |
|00002ed0| 3c 3e 20 30 29 3b 09 09 | 7b 6b 65 65 70 20 67 6f |<> 0);..|{keep go|
|00002ee0| 69 6e 67 20 75 6e 74 69 | 6c 20 6e 6f 6e 65 20 6c |ing unti|l none l|
|00002ef0| 65 66 74 7d 0d 09 43 6c | 65 61 6e 55 70 3b 0d 0d |eft}..Cl|eanUp;..|
|00002f00| 09 53 75 63 63 65 73 73 | 28 66 69 29 3b 0d 45 4e |.Success|(fi);.EN|
|00002f10| 44 3b 20 7b 42 75 69 6c | 64 5a 6f 6e 65 4c 69 73 |D; {Buil|dZoneLis|
|00002f20| 74 50 68 61 73 65 32 7d | 0d 0d 0d 7b 24 53 20 4d |tPhase2}|...{$S M|
|00002f30| 61 69 6e 7d 0d 50 52 4f | 43 45 44 55 52 45 20 5a |ain}.PRO|CEDURE Z|
|00002f40| 6f 6e 65 4c 69 73 74 44 | 72 61 77 28 64 6c 67 3a |oneListD|raw(dlg:|
|00002f50| 20 44 69 61 6c 6f 67 50 | 74 72 3b 20 69 74 65 6d | DialogP|tr; item|
|00002f60| 3a 20 49 4e 54 45 47 45 | 52 29 3b 0d 0d 7b 54 68 |: INTEGE|R);..{Th|
|00002f70| 65 20 75 73 65 72 20 69 | 74 65 6d 20 70 72 6f 63 |e user i|tem proc|
|00002f80| 65 64 75 72 65 20 66 6f | 72 20 74 68 65 20 7a 6f |edure fo|r the zo|
|00002f90| 6e 65 20 6c 69 73 74 20 | 75 73 65 72 20 69 74 65 |ne list |user ite|
|00002fa0| 6d 20 61 6e 64 20 64 65 | 66 61 75 6c 74 0d 20 62 |m and de|fault. b|
|00002fb0| 6f 78 20 75 73 65 72 20 | 69 74 65 6d 20 69 6e 20 |ox user |item in |
|00002fc0| 74 68 65 20 64 69 61 6c | 6f 67 2e 20 44 72 61 77 |the dial|og. Draw|
|00002fd0| 20 74 68 65 20 6c 69 73 | 74 20 61 6e 64 20 74 68 | the lis|t and th|
|00002fe0| 65 20 66 72 61 6d 65 20 | 74 68 61 74 20 67 6f 65 |e frame |that goe|
|00002ff0| 73 20 77 69 74 68 20 69 | 74 2e 0d 20 44 72 61 77 |s with i|t.. Draw|
|00003000| 20 74 68 65 20 64 65 66 | 61 75 6c 74 20 62 6f 78 | the def|ault box|
|00003010| 20 61 72 6f 75 6e 64 20 | 74 68 65 20 4f 4b 20 62 | around |the OK b|
|00003020| 75 74 74 6f 6e 2e 7d 0d | 0d 56 41 52 0d 09 70 6f |utton.}.|.VAR..po|
|00003030| 72 74 09 3a 20 47 72 61 | 66 50 74 72 3b 0d 09 6b |rt.: Gra|fPtr;..k|
|00003040| 69 6e 64 09 3a 20 49 4e | 54 45 47 45 52 3b 0d 09 |ind.: IN|TEGER;..|
|00003050| 68 09 09 3a 20 48 61 6e | 64 6c 65 3b 0d 09 72 09 |h..: Han|dle;..r.|
|00003060| 09 3a 20 52 65 63 74 3b | 0d 09 70 73 09 09 3a 20 |.: Rect;|..ps..: |
|00003070| 50 65 6e 53 74 61 74 65 | 3b 0d 0d 42 45 47 49 4e |PenState|;..BEGIN|
|00003080| 0d 09 47 65 74 50 6f 72 | 74 28 70 6f 72 74 29 3b |..GetPor|t(port);|
|00003090| 09 09 09 09 09 09 09 09 | 09 7b 73 61 76 65 20 6f |........|.{save o|
|000030a0| 6c 64 20 70 6f 72 74 7d | 0d 09 53 65 74 50 6f 72 |ld port}|..SetPor|
|000030b0| 74 28 64 6c 67 29 3b 09 | 09 09 09 09 09 09 09 09 |t(dlg);.|........|
|000030c0| 7b 6d 61 6b 65 20 64 69 | 61 6c 6f 67 20 70 6f 72 |{make di|alog por|
|000030d0| 74 7d 0d 09 43 41 53 45 | 20 69 74 65 6d 20 4f 46 |t}..CASE| item OF|
|000030e0| 0d 09 64 5a 6f 6e 65 4c | 69 73 74 3a 20 42 45 47 |..dZoneL|ist: BEG|
|000030f0| 49 4e 0d 09 09 09 4c 55 | 70 64 61 74 65 28 64 6c |IN....LU|pdate(dl|
|00003100| 67 5e 2e 76 69 73 52 67 | 6e 2c 20 67 4c 69 73 74 |g^.visRg|n, gList|
|00003110| 29 3b 09 09 09 7b 72 65 | 2d 64 72 61 77 20 6c 69 |);...{re|-draw li|
|00003120| 73 74 7d 0d 09 09 09 47 | 65 74 44 49 74 65 6d 28 |st}....G|etDItem(|
|00003130| 64 6c 67 2c 20 64 5a 6f | 6e 65 4c 69 73 74 2c 20 |dlg, dZo|neList, |
|00003140| 6b 69 6e 64 2c 20 68 2c | 20 72 29 3b 0d 09 09 09 |kind, h,| r);....|
|00003150| 49 6e 73 65 74 52 65 63 | 74 28 72 2c 20 6b 4c 69 |InsetRec|t(r, kLi|
|00003160| 73 74 49 6e 73 65 74 2c | 20 6b 4c 69 73 74 49 6e |stInset,| kListIn|
|00003170| 73 65 74 29 3b 0d 09 09 | 09 46 72 61 6d 65 52 65 |set);...|.FrameRe|
|00003180| 63 74 28 72 29 3b 09 09 | 09 09 09 09 09 7b 72 65 |ct(r);..|.....{re|
|00003190| 2d 64 72 61 77 20 66 72 | 61 6d 65 7d 0d 09 09 45 |-draw fr|ame}...E|
|000031a0| 4e 44 3b 0d 09 64 44 65 | 66 61 75 6c 74 3a 20 42 |ND;..dDe|fault: B|
|000031b0| 45 47 49 4e 0d 09 09 09 | 47 65 74 44 49 74 65 6d |EGIN....|GetDItem|
|000031c0| 28 64 6c 67 2c 20 64 44 | 65 66 61 75 6c 74 2c 20 |(dlg, dD|efault, |
|000031d0| 6b 69 6e 64 2c 20 68 2c | 20 72 29 3b 0d 09 09 09 |kind, h,| r);....|
|000031e0| 47 65 74 50 65 6e 53 74 | 61 74 65 28 70 73 29 3b |GetPenSt|ate(ps);|
|000031f0| 0d 09 09 09 50 65 6e 4e | 6f 72 6d 61 6c 3b 09 09 |....PenN|ormal;..|
|00003200| 09 09 09 09 09 09 7b 61 | 6c 77 61 79 73 20 62 65 |......{a|lways be|
|00003210| 20 6f 6e 20 74 68 65 20 | 64 65 66 65 6e 73 69 76 | on the |defensiv|
|00003220| 65 7d 0d 09 09 09 50 65 | 6e 53 69 7a 65 28 33 2c |e}....Pe|nSize(3,|
|00003230| 20 33 29 3b 0d 09 09 09 | 49 6e 73 65 74 52 65 63 | 3);....|InsetRec|
|00003240| 74 28 72 2c 20 2d 34 2c | 20 2d 34 29 3b 0d 09 09 |t(r, -4,| -4);...|
|00003250| 09 46 72 61 6d 65 52 6f | 75 6e 64 52 65 63 74 28 |.FrameRo|undRect(|
|00003260| 72 2c 20 31 36 2c 20 31 | 36 29 3b 09 09 09 09 7b |r, 16, 1|6);....{|
|00003270| 64 72 61 77 20 64 65 66 | 61 75 6c 74 20 62 6f 78 |draw def|ault box|
|00003280| 7d 0d 09 09 09 53 65 74 | 50 65 6e 53 74 61 74 65 |}....Set|PenState|
|00003290| 28 70 73 29 3b 0d 09 09 | 45 4e 44 3b 0d 09 45 4e |(ps);...|END;..EN|
|000032a0| 44 3b 0d 09 53 65 74 50 | 6f 72 74 28 70 6f 72 74 |D;..SetP|ort(port|
|000032b0| 29 3b 09 09 09 09 09 09 | 09 09 09 7b 72 65 73 74 |);......|...{rest|
|000032c0| 6f 72 65 20 6f 6c 64 20 | 70 6f 72 74 7d 0d 45 4e |ore old |port}.EN|
|000032d0| 44 3b 20 7b 5a 6f 6e 65 | 4c 69 73 74 44 72 61 77 |D; {Zone|ListDraw|
|000032e0| 7d 0d 0d 0d 7b 24 53 20 | 4d 61 69 6e 7d 0d 46 55 |}...{$S |Main}.FU|
|000032f0| 4e 43 54 49 4f 4e 20 4c | 69 73 74 46 69 6c 74 65 |NCTION L|istFilte|
|00003300| 72 20 28 64 6c 67 3a 20 | 44 69 61 6c 6f 67 50 74 |r (dlg: |DialogPt|
|00003310| 72 3b 20 56 41 52 20 65 | 76 65 6e 74 3a 20 45 76 |r; VAR e|vent: Ev|
|00003320| 65 6e 74 52 65 63 6f 72 | 64 3b 0d 09 09 09 09 09 |entRecor|d;......|
|00003330| 09 09 09 09 09 09 56 41 | 52 20 69 74 65 6d 3a 20 |......VA|R item: |
|00003340| 49 4e 54 45 47 45 52 29 | 20 3a 20 42 4f 4f 4c 45 |INTEGER)| : BOOLE|
|00003350| 41 4e 3b 0d 0d 7b 50 61 | 73 73 65 64 20 61 73 20 |AN;..{Pa|ssed as |
|00003360| 70 61 72 61 6d 65 74 65 | 72 20 74 6f 20 4d 6f 64 |paramete|r to Mod|
|00003370| 61 6c 44 69 61 6c 6f 67 | 2e 20 48 61 6e 64 6c 65 |alDialog|. Handle|
|00003380| 20 6b 65 79 20 70 72 65 | 73 73 65 73 20 61 6e 64 | key pre|sses and|
|00003390| 20 6d 6f 75 73 65 20 63 | 6c 69 63 6b 73 0d 20 66 | mouse c|licks. f|
|000033a0| 72 6f 6d 20 74 68 65 20 | 75 73 65 72 2e 20 44 6f |rom the |user. Do|
|000033b0| 20 61 6c 6c 20 74 68 65 | 20 72 69 67 68 74 20 64 | all the| right d|
|000033c0| 65 66 61 75 6c 74 20 61 | 63 74 69 6f 6e 73 20 73 |efault a|ctions s|
|000033d0| 69 6e 63 65 20 77 65 20 | 6f 76 65 72 72 69 64 65 |ince we |override|
|000033e0| 20 74 68 65 6d 0d 20 62 | 79 20 76 69 72 74 75 65 | them. b|y virtue|
|000033f0| 20 6f 66 20 6f 75 72 20 | 65 78 69 73 74 65 6e 63 | of our |existenc|
|00003400| 65 2e 7d 0d 0d 56 41 52 | 0d 09 70 6f 72 74 09 09 |e.}..VAR|..port..|
|00003410| 3a 20 47 72 61 66 50 74 | 72 3b 0d 09 6c 6f 63 09 |: GrafPt|r;..loc.|
|00003420| 09 09 3a 20 50 6f 69 6e | 74 3b 0d 09 6b 69 6e 64 |..: Poin|t;..kind|
|00003430| 09 09 3a 20 49 4e 54 45 | 47 45 52 3b 0d 09 68 09 |..: INTE|GER;..h.|
|00003440| 09 09 3a 20 48 61 6e 64 | 6c 65 3b 0d 09 72 09 09 |..: Hand|le;..r..|
|00003450| 09 3a 20 52 65 63 74 3b | 0d 09 69 67 6e 6f 72 65 |.: Rect;|..ignore|
|00003460| 09 09 3a 20 42 4f 4f 4c | 45 41 4e 3b 0d 09 6b 65 |..: BOOL|EAN;..ke|
|00003470| 79 09 09 09 3a 20 53 69 | 67 6e 65 64 42 79 74 65 |y...: Si|gnedByte|
|00003480| 3b 0d 09 66 69 6e 61 6c | 54 69 63 6b 73 09 3a 20 |;..final|Ticks.: |
|00003490| 4c 6f 6e 67 49 6e 74 3b | 0d 42 45 47 49 4e 0d 09 |LongInt;|.BEGIN..|
|000034a0| 4c 69 73 74 46 69 6c 74 | 65 72 20 3a 3d 20 46 41 |ListFilt|er := FA|
|000034b0| 4c 53 45 3b 09 09 09 09 | 09 09 09 09 7b 61 6c 77 |LSE;....|....{alw|
|000034c0| 61 79 73 20 64 65 66 61 | 75 6c 74 20 46 41 4c 53 |ays defa|ult FALS|
|000034d0| 45 7d 0d 09 43 41 53 45 | 20 65 76 65 6e 74 2e 77 |E}..CASE| event.w|
|000034e0| 68 61 74 20 4f 46 0d 09 | 09 6b 65 79 44 6f 77 6e |hat OF..|.keyDown|
|000034f0| 2c 20 61 75 74 6f 4b 65 | 79 3a 20 42 45 47 49 4e |, autoKe|y: BEGIN|
|00003500| 09 09 09 09 09 09 09 7b | 63 68 65 63 6b 20 66 6f |.......{|check fo|
|00003510| 72 20 3c 63 72 3e 20 6f | 72 20 3c 65 6e 74 65 72 |r <cr> o|r <enter|
|00003520| 3e 7d 0d 09 09 09 6b 65 | 79 20 3a 3d 20 53 69 67 |>}....ke|y := Sig|
|00003530| 6e 65 64 42 79 74 65 28 | 65 76 65 6e 74 2e 6d 65 |nedByte(|event.me|
|00003540| 73 73 61 67 65 29 3b 0d | 09 09 09 49 46 20 6b 65 |ssage);.|...IF ke|
|00003550| 79 20 49 4e 20 5b 6b 43 | 52 2c 20 6b 45 4e 54 45 |y IN [kC|R, kENTE|
|00003560| 52 5d 20 54 48 45 4e 20 | 42 45 47 49 4e 09 09 09 |R] THEN |BEGIN...|
|00003570| 7b 69 74 20 77 61 73 20 | 61 20 3c 63 72 3e 20 6f |{it was |a <cr> o|
|00003580| 72 20 3c 65 6e 74 65 72 | 3e 7d 0d 09 09 09 09 47 |r <enter|>}.....G|
|00003590| 65 74 44 49 74 65 6d 28 | 64 6c 67 2c 20 6f 6b 2c |etDItem(|dlg, ok,|
|000035a0| 20 6b 69 6e 64 2c 20 68 | 2c 20 72 29 3b 0d 09 09 | kind, h|, r);...|
|000035b0| 09 09 48 69 6c 69 74 65 | 43 6f 6e 74 72 6f 6c 28 |..Hilite|Control(|
|000035c0| 43 6f 6e 74 72 6f 6c 48 | 61 6e 64 6c 65 28 68 29 |ControlH|andle(h)|
|000035d0| 2c 20 6b 48 69 6c 69 74 | 65 29 3b 0d 09 09 09 09 |, kHilit|e);.....|
|000035e0| 44 65 6c 61 79 28 6b 48 | 69 6c 69 74 65 44 65 6c |Delay(kH|iliteDel|
|000035f0| 61 79 2c 20 66 69 6e 61 | 6c 54 69 63 6b 73 29 3b |ay, fina|lTicks);|
|00003600| 0d 09 09 09 09 48 69 6c | 69 74 65 43 6f 6e 74 72 |.....Hil|iteContr|
|00003610| 6f 6c 28 43 6f 6e 74 72 | 6f 6c 48 61 6e 64 6c 65 |ol(Contr|olHandle|
|00003620| 28 68 29 2c 20 6b 44 65 | 48 69 6c 69 74 65 29 3b |(h), kDe|Hilite);|
|00003630| 0d 09 09 09 09 4c 69 73 | 74 46 69 6c 74 65 72 20 |.....Lis|tFilter |
|00003640| 3a 3d 20 54 52 55 45 3b | 09 09 09 09 09 09 7b 73 |:= TRUE;|......{s|
|00003650| 6f 20 77 65 20 68 61 6e | 64 6c 65 20 69 74 7d 0d |o we han|dle it}.|
|00003660| 09 09 09 09 69 74 65 6d | 20 3a 3d 20 31 3b 09 09 |....item| := 1;..|
|00003670| 09 09 09 09 09 09 7b 61 | 6e 64 20 6d 61 6b 65 20 |......{a|nd make |
|00003680| 74 68 65 20 66 69 72 73 | 74 20 69 74 65 6d 20 68 |the firs|t item h|
|00003690| 69 74 7d 0d 09 09 09 45 | 4e 44 3b 0d 09 09 45 4e |it}....E|ND;...EN|
|000036a0| 44 3b 0d 09 09 6d 6f 75 | 73 65 44 6f 77 6e 3a 20 |D;...mou|seDown: |
|000036b0| 42 45 47 49 4e 09 09 09 | 09 09 09 09 09 7b 77 65 |BEGIN...|.....{we|
|000036c0| 20 77 61 6e 74 20 6d 6f | 75 73 65 44 6f 77 6e 73 | want mo|useDowns|
|000036d0| 7d 0d 09 09 09 47 65 74 | 50 6f 72 74 28 70 6f 72 |}....Get|Port(por|
|000036e0| 74 29 3b 0d 09 09 09 53 | 65 74 50 6f 72 74 28 64 |t);....S|etPort(d|
|000036f0| 6c 67 29 3b 0d 09 09 09 | 6c 6f 63 20 3a 3d 20 65 |lg);....|loc := e|
|00003700| 76 65 6e 74 2e 77 68 65 | 72 65 3b 0d 09 09 09 47 |vent.whe|re;....G|
|00003710| 6c 6f 62 61 6c 54 6f 4c | 6f 63 61 6c 28 6c 6f 63 |lobalToL|ocal(loc|
|00003720| 29 3b 09 09 09 09 09 09 | 09 7b 66 69 6e 64 20 77 |);......|.{find w|
|00003730| 68 65 72 65 20 63 6c 69 | 63 6b 65 64 7d 0d 09 09 |here cli|cked}...|
|00003740| 09 47 65 74 44 49 74 65 | 6d 28 64 6c 67 2c 20 64 |.GetDIte|m(dlg, d|
|00003750| 5a 6f 6e 65 4c 69 73 74 | 2c 20 6b 69 6e 64 2c 20 |ZoneList|, kind, |
|00003760| 68 2c 20 72 29 3b 09 09 | 7b 67 65 74 20 72 65 63 |h, r);..|{get rec|
|00003770| 74 20 66 6f 72 20 6c 69 | 73 74 7d 0d 09 09 09 49 |t for li|st}....I|
|00003780| 46 20 50 74 49 6e 52 65 | 63 74 28 6c 6f 63 2c 20 |F PtInRe|ct(loc, |
|00003790| 72 29 20 54 48 45 4e 20 | 42 45 47 49 4e 09 09 09 |r) THEN |BEGIN...|
|000037a0| 09 7b 69 66 20 63 6c 69 | 63 6b 65 64 20 69 6e 73 |.{if cli|cked ins|
|000037b0| 69 64 65 c9 7d 0d 09 09 | 09 09 4c 69 73 74 46 69 |ide.}...|..ListFi|
|000037c0| 6c 74 65 72 20 3a 3d 20 | 54 52 55 45 3b 09 09 09 |lter := |TRUE;...|
|000037d0| 09 09 09 7b 77 65 20 74 | 61 6b 65 20 63 61 72 65 |...{we t|ake care|
|000037e0| 20 6f 66 20 69 74 7d 0d | 09 09 09 09 69 67 6e 6f | of it}.|....igno|
|000037f0| 72 65 20 3a 3d 20 4c 43 | 6c 69 63 6b 28 6c 6f 63 |re := LC|lick(loc|
|00003800| 2c 20 65 76 65 6e 74 2e | 6d 6f 64 69 66 69 65 72 |, event.|modifier|
|00003810| 73 2c 0d 09 09 09 09 09 | 09 09 09 09 67 4c 69 73 |s,......|....gLis|
|00003820| 74 29 3b 09 09 09 09 7b | 62 79 20 70 61 73 73 69 |t);....{|by passi|
|00003830| 6e 67 20 63 6c 69 63 6b | 20 74 6f 20 6c 69 73 74 |ng click| to list|
|00003840| 7d 0d 09 09 09 45 4e 44 | 3b 0d 09 09 09 53 65 74 |}....END|;....Set|
|00003850| 50 6f 72 74 28 70 6f 72 | 74 29 3b 0d 09 09 45 4e |Port(por|t);...EN|
|00003860| 44 3b 0d 09 45 4e 44 3b | 0d 45 4e 44 3b 20 7b 4c |D;..END;|.END; {L|
|00003870| 69 73 74 46 69 6c 74 65 | 72 7d 0d 0d 0d 7b 24 53 |istFilte|r}...{$S|
|00003880| 20 4d 61 69 6e 7d 0d 50 | 52 4f 43 45 44 55 52 45 | Main}.P|ROCEDURE|
|00003890| 20 44 6f 5a 6f 6e 65 4c | 69 73 74 3b 0d 0d 7b 50 | DoZoneL|ist;..{P|
|000038a0| 75 74 20 75 70 20 61 20 | 6d 6f 64 61 6c 20 64 69 |ut up a |modal di|
|000038b0| 61 6c 6f 67 20 74 68 61 | 74 20 73 68 6f 77 73 20 |alog tha|t shows |
|000038c0| 61 20 6c 69 73 74 20 6f | 66 20 74 68 65 20 7a 6f |a list o|f the zo|
|000038d0| 6e 65 73 20 6f 6e 20 74 | 68 65 20 6e 65 74 2e 20 |nes on t|he net. |
|000038e0| 43 72 65 61 74 65 20 74 | 68 65 20 64 69 61 6c 6f |Create t|he dialo|
|000038f0| 67 0d 20 61 6e 64 20 6c | 69 73 74 2c 20 63 61 6c |g. and l|ist, cal|
|00003900| 6c 20 42 75 69 6c 64 5a | 6f 6e 65 4c 69 73 74 20 |l BuildZ|oneList |
|00003910| 74 6f 20 66 69 6c 6c 20 | 69 74 2c 20 74 68 65 6e |to fill |it, then|
|00003920| 20 77 61 69 74 20 66 6f | 72 20 74 68 65 20 75 73 | wait fo|r the us|
|00003930| 65 72 20 74 6f 20 63 6c | 69 63 6b 20 4f 4b 2e 7d |er to cl|ick OK.}|
|00003940| 0d 0d 56 41 52 0d 09 64 | 6c 67 09 09 09 09 09 09 |..VAR..d|lg......|
|00003950| 3a 20 44 69 61 6c 6f 67 | 50 74 72 3b 0d 09 69 74 |: Dialog|Ptr;..it|
|00003960| 65 6d 2c 20 6b 69 6e 64 | 09 09 09 09 3a 20 49 4e |em, kind|....: IN|
|00003970| 54 45 47 45 52 3b 0d 09 | 68 09 09 09 09 09 09 3a |TEGER;..|h......:|
|00003980| 20 48 61 6e 64 6c 65 3b | 0d 09 72 2c 20 72 56 69 | Handle;|..r, rVi|
|00003990| 65 77 2c 20 64 61 74 61 | 42 6f 75 6e 64 73 09 3a |ew, data|Bounds.:|
|000039a0| 20 52 65 63 74 3b 0d 09 | 63 53 69 7a 65 09 09 09 | Rect;..|cSize...|
|000039b0| 09 09 3a 20 50 6f 69 6e | 74 3b 0d 09 66 69 09 09 |..: Poin|t;..fi..|
|000039c0| 09 09 09 09 3a 20 46 61 | 69 6c 49 6e 66 6f 3b 0d |....: Fa|ilInfo;.|
|000039d0| 09 68 6f 72 2c 20 76 65 | 72 09 09 09 09 3a 20 49 |.hor, ve|r....: I|
|000039e0| 4e 54 45 47 45 52 3b 0d | 0d 09 50 52 4f 43 45 44 |NTEGER;.|..PROCED|
|000039f0| 55 52 45 20 43 6c 65 61 | 6e 55 70 3b 0d 09 42 45 |URE Clea|nUp;..BE|
|00003a00| 47 49 4e 0d 09 09 49 46 | 20 67 4c 69 73 74 20 3c |GIN...IF| gList <|
|00003a10| 3e 20 4e 49 4c 20 54 48 | 45 4e 0d 09 09 09 4c 44 |> NIL TH|EN....LD|
|00003a20| 69 73 70 6f 73 65 28 67 | 4c 69 73 74 29 3b 09 09 |ispose(g|List);..|
|00003a30| 09 09 09 09 09 09 7b 67 | 65 74 20 72 69 64 20 6f |......{g|et rid o|
|00003a40| 66 20 6c 69 73 74 7d 0d | 09 09 49 46 20 64 6c 67 |f list}.|..IF dlg|
|00003a50| 20 3c 3e 20 4e 49 4c 20 | 54 48 45 4e 0d 09 09 09 | <> NIL |THEN....|
|00003a60| 44 69 73 70 6f 73 44 69 | 61 6c 6f 67 28 64 6c 67 |DisposDi|alog(dlg|
|00003a70| 29 3b 09 09 09 09 09 09 | 09 09 7b 67 65 74 20 72 |);......|..{get r|
|00003a80| 69 64 20 6f 66 20 64 69 | 61 6c 6f 67 7d 0d 09 45 |id of di|alog}..E|
|00003a90| 4e 44 3b 20 7b 43 6c 65 | 61 6e 55 70 7d 0d 0d 09 |ND; {Cle|anUp}...|
|00003aa0| 50 52 4f 43 45 44 55 52 | 45 20 48 61 6e 64 6c 65 |PROCEDUR|E Handle|
|00003ab0| 45 72 72 28 65 72 72 6f | 72 3a 20 49 4e 54 45 47 |Err(erro|r: INTEG|
|00003ac0| 45 52 3b 20 6d 65 73 73 | 61 67 65 3a 20 4c 6f 6e |ER; mess|age: Lon|
|00003ad0| 67 49 6e 74 29 3b 0d 09 | 42 45 47 49 4e 0d 09 09 |gInt);..|BEGIN...|
|00003ae0| 43 6c 65 61 6e 55 70 3b | 09 09 09 09 09 09 09 09 |CleanUp;|........|
|00003af0| 09 09 09 7b 72 65 6c 65 | 61 73 65 20 6a 75 6e 6b |...{rele|ase junk|
|00003b00| 7d 0d 09 45 4e 44 3b 0d | 0d 42 45 47 49 4e 0d 09 |}..END;.|.BEGIN..|
|00003b10| 67 4c 69 73 74 20 3a 3d | 20 4e 49 4c 3b 09 09 09 |gList :=| NIL;...|
|00003b20| 09 09 09 09 09 09 09 09 | 7b 69 6e 69 74 20 73 6f |........|{init so|
|00003b30| 6d 65 20 69 6d 70 6f 72 | 74 61 6e 74 20 76 61 72 |me impor|tant var|
|00003b40| 69 61 62 6c 65 73 7d 0d | 09 64 6c 67 20 3a 3d 20 |iables}.|.dlg := |
|00003b50| 4e 49 4c 3b 0d 09 43 61 | 74 63 68 46 61 69 6c 75 |NIL;..Ca|tchFailu|
|00003b60| 72 65 73 28 66 69 2c 20 | 48 61 6e 64 6c 65 45 72 |res(fi, |HandleEr|
|00003b70| 72 29 3b 0d 0d 09 64 6c | 67 20 3a 3d 20 47 65 74 |r);...dl|g := Get|
|00003b80| 4e 65 77 44 69 61 6c 6f | 67 28 72 5a 6f 6e 65 44 |NewDialo|g(rZoneD|
|00003b90| 69 61 6c 6f 67 2c 20 4e | 49 4c 2c 20 50 4f 49 4e |ialog, N|IL, POIN|
|00003ba0| 54 45 52 28 2d 31 29 29 | 3b 09 09 7b 63 72 65 61 |TER(-1))|;..{crea|
|00003bb0| 74 65 20 64 69 61 6c 6f | 67 7d 0d 09 46 61 69 6c |te dialo|g}..Fail|
|00003bc0| 4e 49 4c 4d 73 67 28 64 | 6c 67 2c 20 65 4e 6f 4d |NILMsg(d|lg, eNoM|
|00003bd0| 65 6d 6f 72 79 29 3b 0d | 0d 09 7b 57 65 20 63 65 |emory);.|..{We ce|
|00003be0| 6e 74 65 72 20 74 68 65 | 20 64 69 61 6c 6f 67 20 |nter the| dialog |
|00003bf0| 68 6f 72 69 7a 6f 6e 74 | 61 6c 6c 79 20 61 6e 64 |horizont|ally and|
|00003c00| 20 70 6f 73 69 74 69 6f | 6e 20 69 74 20 76 65 72 | positio|n it ver|
|00003c10| 74 69 63 61 6c 6c 79 20 | 6f 6e 65 2d 74 68 69 72 |tically |one-thir|
|00003c20| 64 20 74 68 65 0d 09 20 | 64 69 73 74 61 6e 63 65 |d the.. |distance|
|00003c30| 20 66 72 6f 6d 20 74 68 | 65 20 6d 65 6e 75 20 62 | from th|e menu b|
|00003c40| 61 72 20 74 6f 20 74 68 | 65 20 62 6f 74 74 6f 6d |ar to th|e bottom|
|00003c50| 20 6f 66 20 74 68 65 20 | 6d 61 69 6e 20 64 65 76 | of the |main dev|
|00003c60| 69 63 65 2e 20 57 65 20 | 64 6f 20 6e 6f 74 0d 09 |ice. We |do not..|
|00003c70| 20 63 68 65 63 6b 20 66 | 6f 72 20 74 68 65 20 64 | check f|or the d|
|00003c80| 69 61 6c 6f 67 20 65 78 | 74 65 6e 64 69 6e 67 20 |ialog ex|tending |
|00003c90| 70 61 73 74 20 74 68 65 | 20 62 6f 74 74 6f 6d 20 |past the| bottom |
|00003ca0| 6f 66 20 74 68 65 20 64 | 65 76 69 63 65 20 62 65 |of the d|evice be|
|00003cb0| 63 61 75 73 65 20 77 65 | 0d 09 20 6b 6e 6f 77 20 |cause we|.. know |
|00003cc0| 74 68 65 20 64 69 61 6c | 6f 67 20 69 73 20 6e 6f |the dial|og is no|
|00003cd0| 74 20 74 68 61 74 20 62 | 69 67 2e 20 59 6f 75 20 |t that b|ig. You |
|00003ce0| 6d 61 79 20 77 69 73 68 | 20 74 6f 20 6d 61 6b 65 |may wish| to make|
|00003cf0| 20 74 68 61 74 20 63 68 | 65 63 6b 2e 7d 0d 09 57 | that ch|eck.}..W|
|00003d00| 49 54 48 20 64 6c 67 5e | 2e 70 6f 72 74 52 65 63 |ITH dlg^|.portRec|
|00003d10| 74 20 44 4f 20 42 45 47 | 49 4e 0d 09 09 68 6f 72 |t DO BEG|IN...hor|
|00003d20| 20 3a 3d 20 72 69 67 68 | 74 20 2d 20 6c 65 66 74 | := righ|t - left|
|00003d30| 3b 0d 09 09 76 65 72 20 | 3a 3d 20 62 6f 74 74 6f |;...ver |:= botto|
|00003d40| 6d 20 2d 20 74 6f 70 3b | 0d 09 45 4e 44 3b 0d 09 |m - top;|..END;..|
|00003d50| 57 49 54 48 20 73 63 72 | 65 65 6e 42 69 74 73 2e |WITH scr|eenBits.|
|00003d60| 62 6f 75 6e 64 73 20 44 | 4f 20 42 45 47 49 4e 0d |bounds D|O BEGIN.|
|00003d70| 09 09 68 6f 72 20 3a 3d | 20 28 28 72 69 67 68 74 |..hor :=| ((right|
|00003d80| 20 2d 20 6c 65 66 74 29 | 20 2d 20 68 6f 72 29 20 | - left)| - hor) |
|00003d90| 44 49 56 20 32 3b 0d 09 | 09 76 65 72 20 3a 3d 20 |DIV 2;..|.ver := |
|00003da0| 28 28 28 62 6f 74 74 6f | 6d 20 2d 20 74 6f 70 29 |(((botto|m - top)|
|00003db0| 20 2d 20 76 65 72 20 2d | 20 47 65 74 4d 42 61 72 | - ver -| GetMBar|
|00003dc0| 48 65 69 67 68 74 29 20 | 44 49 56 20 33 29 20 2b |Height) |DIV 3) +|
|00003dd0| 20 47 65 74 4d 42 61 72 | 48 65 69 67 68 74 3b 0d | GetMBar|Height;.|
|00003de0| 09 45 4e 44 3b 0d 09 4d | 6f 76 65 57 69 6e 64 6f |.END;..M|oveWindo|
|00003df0| 77 28 64 6c 67 2c 20 68 | 6f 72 2c 20 76 65 72 2c |w(dlg, h|or, ver,|
|00003e00| 20 46 41 4c 53 45 29 3b | 0d 0d 09 47 65 74 44 49 | FALSE);|...GetDI|
|00003e10| 74 65 6d 28 64 6c 67 2c | 20 64 44 65 66 61 75 6c |tem(dlg,| dDefaul|
|00003e20| 74 2c 20 6b 69 6e 64 2c | 20 68 2c 20 72 29 3b 0d |t, kind,| h, r);.|
|00003e30| 09 68 20 3a 3d 20 40 5a | 6f 6e 65 4c 69 73 74 44 |.h := @Z|oneListD|
|00003e40| 72 61 77 3b 09 09 09 09 | 09 09 09 09 09 09 7b 63 |raw;....|......{c|
|00003e50| 6f 6e 6e 65 63 74 20 64 | 72 61 77 69 6e 67 20 70 |onnect d|rawing p|
|00003e60| 72 6f 63 65 64 75 72 65 | 7d 0d 09 53 65 74 44 49 |rocedure|}..SetDI|
|00003e70| 74 65 6d 28 64 6c 67 2c | 20 64 44 65 66 61 75 6c |tem(dlg,| dDefaul|
|00003e80| 74 2c 20 6b 69 6e 64 2c | 20 68 2c 20 72 29 3b 0d |t, kind,| h, r);.|
|00003e90| 09 47 65 74 44 49 74 65 | 6d 28 64 6c 67 2c 20 64 |.GetDIte|m(dlg, d|
|00003ea0| 5a 6f 6e 65 4c 69 73 74 | 2c 20 6b 69 6e 64 2c 20 |ZoneList|, kind, |
|00003eb0| 68 2c 20 72 29 3b 0d 09 | 68 20 3a 3d 20 40 5a 6f |h, r);..|h := @Zo|
|00003ec0| 6e 65 4c 69 73 74 44 72 | 61 77 3b 09 09 09 09 09 |neListDr|aw;.....|
|00003ed0| 09 09 09 09 09 7b 63 6f | 6e 6e 65 63 74 20 64 72 |.....{co|nnect dr|
|00003ee0| 61 77 69 6e 67 20 70 72 | 6f 63 65 64 75 72 65 7d |awing pr|ocedure}|
|00003ef0| 0d 09 53 65 74 44 49 74 | 65 6d 28 64 6c 67 2c 20 |..SetDIt|em(dlg, |
|00003f00| 64 5a 6f 6e 65 4c 69 73 | 74 2c 20 6b 69 6e 64 2c |dZoneLis|t, kind,|
|00003f10| 20 68 2c 20 72 29 3b 0d | 09 72 56 69 65 77 20 3a | h, r);.|.rView :|
|00003f20| 3d 20 72 3b 0d 09 57 49 | 54 48 20 72 56 69 65 77 |= r;..WI|TH rView|
|00003f30| 20 44 4f 0d 09 09 72 69 | 67 68 74 20 3a 3d 20 72 | DO...ri|ght := r|
|00003f40| 69 67 68 74 20 2d 20 6b | 53 63 72 6f 6c 6c 42 61 |ight - k|ScrollBa|
|00003f50| 72 57 69 64 74 68 3b 09 | 09 09 09 09 7b 61 64 6a |rWidth;.|....{adj|
|00003f60| 75 73 74 20 72 65 63 74 | 61 6e 67 6c 65 20 66 6f |ust rect|angle fo|
|00003f70| 72 20 73 63 72 6f 6c 6c | 7d 0d 09 53 65 74 52 65 |r scroll|}..SetRe|
|00003f80| 63 74 28 64 61 74 61 42 | 6f 75 6e 64 73 2c 20 30 |ct(dataB|ounds, 0|
|00003f90| 2c 20 30 2c 20 31 2c 20 | 30 29 3b 09 09 09 09 09 |, 0, 1, |0);.....|
|00003fa0| 09 7b 69 6e 69 74 20 74 | 6f 20 6f 6e 65 2d 77 69 |.{init t|o one-wi|
|00003fb0| 64 65 20 6c 69 73 74 7d | 0d 09 53 65 74 50 74 28 |de list}|..SetPt(|
|00003fc0| 63 53 69 7a 65 2c 20 30 | 2c 20 30 29 3b 0d 09 67 |cSize, 0|, 0);..g|
|00003fd0| 4c 69 73 74 20 3a 3d 20 | 4c 4e 65 77 28 72 56 69 |List := |LNew(rVi|
|00003fe0| 65 77 2c 20 64 61 74 61 | 42 6f 75 6e 64 73 2c 20 |ew, data|Bounds, |
|00003ff0| 63 53 69 7a 65 2c 20 30 | 2c 20 57 69 6e 64 6f 77 |cSize, 0|, Window|
|00004000| 50 74 72 28 64 6c 67 29 | 2c 0d 09 09 09 09 09 46 |Ptr(dlg)|,......F|
|00004010| 41 4c 53 45 2c 20 46 41 | 4c 53 45 2c 20 46 41 4c |ALSE, FA|LSE, FAL|
|00004020| 53 45 2c 20 54 52 55 45 | 29 3b 09 09 09 09 7b 63 |SE, TRUE|);....{c|
|00004030| 72 65 61 74 65 20 77 69 | 74 68 20 76 65 72 74 69 |reate wi|th verti|
|00004040| 63 61 6c 20 73 63 72 6f | 6c 6c 7d 0d 09 46 61 69 |cal scro|ll}..Fai|
|00004050| 6c 4e 49 4c 4d 73 67 28 | 67 4c 69 73 74 2c 20 65 |lNILMsg(|gList, e|
|00004060| 4e 6f 4d 65 6d 6f 72 79 | 29 3b 0d 0d 09 69 66 20 |NoMemory|);...if |
|00004070| 67 4d 61 63 2e 61 74 44 | 72 76 72 56 65 72 73 4e |gMac.atD|rvrVersN|
|00004080| 75 6d 20 3e 3d 20 35 33 | 20 74 68 65 6e 0d 09 09 |um >= 53| then...|
|00004090| 42 75 69 6c 64 5a 6f 6e | 65 4c 69 73 74 50 68 61 |BuildZon|eListPha|
|000040a0| 73 65 32 0d 09 65 6c 73 | 65 0d 09 09 42 75 69 6c |se2..els|e...Buil|
|000040b0| 64 5a 6f 6e 65 4c 69 73 | 74 3b 09 09 09 09 09 09 |dZoneLis|t;......|
|000040c0| 09 09 09 09 09 7b 70 75 | 74 20 74 68 65 20 73 74 |.....{pu|t the st|
|000040d0| 75 66 66 20 69 6e 74 6f | 20 74 68 65 20 6c 69 73 |uff into| the lis|
|000040e0| 74 7d 0d 0d 09 53 65 74 | 50 74 28 63 53 69 7a 65 |t}...Set|Pt(cSize|
|000040f0| 2c 20 30 2c 20 30 29 3b | 0d 09 4c 53 65 74 53 65 |, 0, 0);|..LSetSe|
|00004100| 6c 65 63 74 28 54 52 55 | 45 2c 20 63 53 69 7a 65 |lect(TRU|E, cSize|
|00004110| 2c 20 67 4c 69 73 74 29 | 3b 09 09 09 09 09 09 09 |, gList)|;.......|
|00004120| 7b 73 65 6c 65 63 74 20 | 74 68 65 20 66 69 72 73 |{select |the firs|
|00004130| 74 20 67 75 79 7d 0d 09 | 4c 44 6f 44 72 61 77 28 |t guy}..|LDoDraw(|
|00004140| 54 52 55 45 2c 20 67 4c | 69 73 74 29 3b 09 09 09 |TRUE, gL|ist);...|
|00004150| 09 09 09 09 09 09 7b 74 | 75 72 6e 20 6f 6e 20 74 |......{t|urn on t|
|00004160| 68 65 20 6c 69 73 74 7d | 0d 09 53 68 6f 77 57 69 |he list}|..ShowWi|
|00004170| 6e 64 6f 77 28 64 6c 67 | 29 3b 09 09 09 09 09 09 |ndow(dlg|);......|
|00004180| 09 09 09 09 7b 74 75 72 | 6e 20 6f 6e 20 74 68 65 |....{tur|n on the|
|00004190| 20 64 69 61 6c 6f 67 7d | 0d 09 52 45 50 45 41 54 | dialog}|..REPEAT|
|000041a0| 0d 09 09 4d 6f 64 61 6c | 44 69 61 6c 6f 67 28 40 |...Modal|Dialog(@|
|000041b0| 4c 69 73 74 46 69 6c 74 | 65 72 2c 20 69 74 65 6d |ListFilt|er, item|
|000041c0| 29 3b 09 09 09 09 09 09 | 7b 61 63 63 65 70 74 20 |);......|{accept |
|000041d0| 65 76 65 6e 74 73 7d 0d | 09 55 4e 54 49 4c 20 69 |events}.|.UNTIL i|
|000041e0| 74 65 6d 20 3d 20 6f 6b | 3b 09 09 09 09 09 09 09 |tem = ok|;.......|
|000041f0| 09 09 09 7b 75 6e 74 69 | 6c 20 68 65 20 70 72 65 |...{unti|l he pre|
|00004200| 73 73 65 73 20 27 6f 6b | 27 7d 0d 09 43 6c 65 61 |sses 'ok|'}..Clea|
|00004210| 6e 55 70 3b 0d 0d 09 53 | 75 63 63 65 73 73 28 66 |nUp;...S|uccess(f|
|00004220| 69 29 3b 0d 45 4e 44 3b | 20 7b 44 6f 5a 6f 6e 65 |i);.END;| {DoZone|
|00004230| 4c 69 73 74 7d 0d 0d 0d | 7b 24 53 20 4d 61 69 6e |List}...|{$S Main|
|00004240| 7d 0d 46 55 4e 43 54 49 | 4f 4e 20 44 6f 43 6c 6f |}.FUNCTI|ON DoClo|
|00004250| 73 65 57 69 6e 64 6f 77 | 28 77 69 6e 64 6f 77 3a |seWindow|(window:|
|00004260| 20 57 69 6e 64 6f 77 50 | 74 72 29 20 3a 20 42 4f | WindowP|tr) : BO|
|00004270| 4f 4c 45 41 4e 3b 0d 42 | 45 47 49 4e 0d 09 44 6f |OLEAN;.B|EGIN..Do|
|00004280| 43 6c 6f 73 65 57 69 6e | 64 6f 77 20 3a 3d 20 54 |CloseWin|dow := T|
|00004290| 52 55 45 3b 0d 09 49 46 | 20 49 73 44 41 57 69 6e |RUE;..IF| IsDAWin|
|000042a0| 64 6f 77 28 77 69 6e 64 | 6f 77 29 20 54 48 45 4e |dow(wind|ow) THEN|
|000042b0| 0d 09 09 43 6c 6f 73 65 | 44 65 73 6b 41 63 63 28 |...Close|DeskAcc(|
|000042c0| 57 69 6e 64 6f 77 50 65 | 65 6b 28 77 69 6e 64 6f |WindowPe|ek(windo|
|000042d0| 77 29 5e 2e 77 69 6e 64 | 6f 77 4b 69 6e 64 29 3b |w)^.wind|owKind);|
|000042e0| 0d 09 49 46 20 49 73 41 | 70 70 57 69 6e 64 6f 77 |..IF IsA|ppWindow|
|000042f0| 28 77 69 6e 64 6f 77 29 | 20 54 48 45 4e 0d 09 09 |(window)| THEN...|
|00004300| 43 6c 6f 73 65 57 69 6e | 64 6f 77 28 77 69 6e 64 |CloseWin|dow(wind|
|00004310| 6f 77 29 3b 0d 45 4e 44 | 3b 20 7b 44 6f 43 6c 6f |ow);.END|; {DoClo|
|00004320| 73 65 57 69 6e 64 6f 77 | 7d 0d 0d 0d 7b 24 53 20 |seWindow|}...{$S |
|00004330| 49 6e 69 74 69 61 6c 69 | 7a 65 7d 0d 50 52 4f 43 |Initiali|ze}.PROC|
|00004340| 45 44 55 52 45 20 49 6e | 69 74 69 61 6c 69 7a 65 |EDURE In|itialize|
|00004350| 3b 0d 56 41 52 0d 09 6d | 65 6e 75 42 61 72 09 09 |;.VAR..m|enuBar..|
|00004360| 09 3a 20 48 61 6e 64 6c | 65 3b 0d 09 77 69 6e 64 |.: Handl|e;..wind|
|00004370| 6f 77 09 09 09 3a 20 57 | 69 6e 64 6f 77 50 74 72 |ow...: W|indowPtr|
|00004380| 3b 0d 09 69 67 6e 6f 72 | 65 45 72 72 6f 72 09 09 |;..ignor|eError..|
|00004390| 3a 20 4f 53 45 72 72 3b | 0d 09 74 6f 74 61 6c 2c |: OSErr;|..total,|
|000043a0| 20 63 6f 6e 74 69 67 09 | 3a 20 4c 6f 6e 67 49 6e | contig.|: LongIn|
|000043b0| 74 3b 0d 09 69 67 6e 6f | 72 65 52 65 73 75 6c 74 |t;..igno|reResult|
|000043c0| 09 3a 20 42 4f 4f 4c 45 | 41 4e 3b 0d 09 65 76 65 |.: BOOLE|AN;..eve|
|000043d0| 6e 74 09 09 09 3a 20 45 | 76 65 6e 74 52 65 63 6f |nt...: E|ventReco|
|000043e0| 72 64 3b 0d 09 63 6f 75 | 6e 74 09 09 09 3a 20 49 |rd;..cou|nt...: I|
|000043f0| 4e 54 45 47 45 52 3b 0d | 09 66 69 09 09 09 09 3a |NTEGER;.|.fi....:|
|00004400| 20 46 61 69 6c 49 6e 66 | 6f 3b 0d 0d 09 50 52 4f | FailInf|o;...PRO|
|00004410| 43 45 44 55 52 45 20 48 | 61 6e 64 6c 65 45 72 72 |CEDURE H|andleErr|
|00004420| 28 65 72 72 6f 72 3a 20 | 49 4e 54 45 47 45 52 3b |(error: |INTEGER;|
|00004430| 20 6d 65 73 73 61 67 65 | 3a 20 4c 6f 6e 67 49 6e | message|: LongIn|
|00004440| 74 29 3b 0d 09 42 45 47 | 49 4e 0d 09 09 49 46 20 |t);..BEG|IN...IF |
|00004450| 65 72 72 6f 72 20 3e 20 | 30 20 54 48 45 4e 0d 09 |error > |0 THEN..|
|00004460| 09 09 41 6c 65 72 74 55 | 73 65 72 28 30 2c 20 65 |..AlertU|ser(0, e|
|00004470| 72 72 6f 72 29 0d 09 09 | 45 4c 53 45 0d 09 09 09 |rror)...|ELSE....|
|00004480| 41 6c 65 72 74 55 73 65 | 72 28 65 72 72 6f 72 2c |AlertUse|r(error,|
|00004490| 20 6d 65 73 73 61 67 65 | 29 3b 0d 09 09 45 78 69 | message|);...Exi|
|000044a0| 74 54 6f 53 68 65 6c 6c | 3b 0d 09 45 4e 44 3b 20 |tToShell|;..END; |
|000044b0| 7b 48 61 6e 64 6c 65 45 | 72 72 7d 0d 0d 42 45 47 |{HandleE|rr}..BEG|
|000044c0| 49 4e 0d 09 67 48 61 73 | 57 61 69 74 4e 65 78 74 |IN..gHas|WaitNext|
|000044d0| 45 76 65 6e 74 20 3a 3d | 20 54 72 61 70 41 76 61 |Event :=| TrapAva|
|000044e0| 69 6c 61 62 6c 65 28 5f | 57 61 69 74 4e 65 78 74 |ilable(_|WaitNext|
|000044f0| 45 76 65 6e 74 2c 20 54 | 6f 6f 6c 54 72 61 70 29 |Event, T|oolTrap)|
|00004500| 3b 0d 09 67 49 6e 42 61 | 63 6b 67 72 6f 75 6e 64 |;..gInBa|ckground|
|00004510| 20 3a 3d 20 46 41 4c 53 | 45 3b 0d 0d 09 49 6e 69 | := FALS|E;...Ini|
|00004520| 74 47 72 61 66 28 40 74 | 68 65 50 6f 72 74 29 3b |tGraf(@t|hePort);|
|00004530| 0d 09 49 6e 69 74 46 6f | 6e 74 73 3b 0d 09 49 6e |..InitFo|nts;..In|
|00004540| 69 74 57 69 6e 64 6f 77 | 73 3b 0d 09 49 6e 69 74 |itWindow|s;..Init|
|00004550| 4d 65 6e 75 73 3b 0d 09 | 54 45 49 6e 69 74 3b 0d |Menus;..|TEInit;.|
|00004560| 09 49 6e 69 74 44 69 61 | 6c 6f 67 73 28 4e 49 4c |.InitDia|logs(NIL|
|00004570| 29 3b 0d 09 49 6e 69 74 | 43 75 72 73 6f 72 3b 0d |);..Init|Cursor;.|
|00004580| 0d 09 46 4f 52 20 63 6f | 75 6e 74 20 3a 3d 20 31 |..FOR co|unt := 1|
|00004590| 20 54 4f 20 33 20 44 4f | 0d 09 09 69 67 6e 6f 72 | TO 3 DO|...ignor|
|000045a0| 65 52 65 73 75 6c 74 20 | 3a 3d 20 45 76 65 6e 74 |eResult |:= Event|
|000045b0| 41 76 61 69 6c 28 65 76 | 65 72 79 45 76 65 6e 74 |Avail(ev|eryEvent|
|000045c0| 2c 20 65 76 65 6e 74 29 | 3b 0d 0d 09 43 61 74 63 |, event)|;...Catc|
|000045d0| 68 46 61 69 6c 75 72 65 | 73 28 66 69 2c 20 48 61 |hFailure|s(fi, Ha|
|000045e0| 6e 64 6c 65 45 72 72 29 | 3b 0d 0d 09 46 61 69 6c |ndleErr)|;...Fail|
|000045f0| 4f 53 45 72 72 4d 73 67 | 28 4d 50 50 4f 70 65 6e |OSErrMsg|(MPPOpen|
|00004600| 2c 20 65 41 70 70 6c 65 | 54 61 6c 6b 29 3b 0d 09 |, eApple|Talk);..|
|00004610| 46 61 69 6c 4f 53 45 72 | 72 4d 73 67 28 41 54 50 |FailOSEr|rMsg(ATP|
|00004620| 4c 6f 61 64 2c 20 65 41 | 70 70 6c 65 54 61 6c 6b |Load, eA|ppleTalk|
|00004630| 29 3b 0d 0d 09 69 67 6e | 6f 72 65 45 72 72 6f 72 |);...ign|oreError|
|00004640| 20 3a 3d 20 53 79 73 45 | 6e 76 69 72 6f 6e 73 28 | := SysE|nvirons(|
|00004650| 6b 53 79 73 45 6e 76 69 | 72 6f 6e 73 56 65 72 73 |kSysEnvi|ronsVers|
|00004660| 69 6f 6e 2c 20 67 4d 61 | 63 29 3b 0d 09 49 46 20 |ion, gMa|c);..IF |
|00004670| 67 4d 61 63 2e 6d 61 63 | 68 69 6e 65 54 79 70 65 |gMac.mac|hineType|
|00004680| 20 3c 20 30 20 54 48 45 | 4e 0d 09 09 46 61 69 6c | < 0 THE|N...Fail|
|00004690| 75 72 65 28 30 2c 20 65 | 57 72 6f 6e 67 4d 61 63 |ure(0, e|WrongMac|
|000046a0| 68 69 6e 65 29 3b 0d 0d | 09 49 46 20 4f 52 44 28 |hine);..|.IF ORD(|
|000046b0| 47 65 74 41 70 70 6c 4c | 69 6d 69 74 29 20 2d 20 |GetApplL|imit) - |
|000046c0| 4f 52 44 28 41 70 70 6c | 69 63 5a 6f 6e 65 29 20 |ORD(Appl|icZone) |
|000046d0| 3c 20 6b 4d 69 6e 48 65 | 61 70 20 54 48 45 4e 0d |< kMinHe|ap THEN.|
|000046e0| 09 09 46 61 69 6c 75 72 | 65 28 30 2c 20 65 53 6d |..Failur|e(0, eSm|
|000046f0| 61 6c 6c 53 69 7a 65 29 | 3b 0d 0d 09 50 75 72 67 |allSize)|;...Purg|
|00004700| 65 53 70 61 63 65 28 74 | 6f 74 61 6c 2c 20 63 6f |eSpace(t|otal, co|
|00004710| 6e 74 69 67 29 3b 0d 09 | 49 46 20 74 6f 74 61 6c |ntig);..|IF total|
|00004720| 20 3c 20 6b 4d 69 6e 53 | 70 61 63 65 20 54 48 45 | < kMinS|pace THE|
|00004730| 4e 0d 09 09 46 61 69 6c | 75 72 65 28 30 2c 20 65 |N...Fail|ure(0, e|
|00004740| 4e 6f 4d 65 6d 6f 72 79 | 29 3b 0d 0d 09 6d 65 6e |NoMemory|);...men|
|00004750| 75 42 61 72 20 3a 3d 20 | 47 65 74 4e 65 77 4d 42 |uBar := |GetNewMB|
|00004760| 61 72 28 72 4d 65 6e 75 | 42 61 72 29 3b 09 09 7b |ar(rMenu|Bar);..{|
|00004770| 72 65 61 64 20 6d 65 6e | 75 73 20 69 6e 74 6f 20 |read men|us into |
|00004780| 6d 65 6e 75 20 62 61 72 | 7d 0d 09 46 61 69 6c 4e |menu bar|}..FailN|
|00004790| 49 4c 4d 73 67 28 6d 65 | 6e 75 42 61 72 2c 20 65 |ILMsg(me|nuBar, e|
|000047a0| 4e 6f 4d 65 6d 6f 72 79 | 29 3b 0d 09 53 65 74 4d |NoMemory|);..SetM|
|000047b0| 65 6e 75 42 61 72 28 6d | 65 6e 75 42 61 72 29 3b |enuBar(m|enuBar);|
|000047c0| 09 09 09 09 09 7b 69 6e | 73 74 61 6c 6c 20 6d 65 |.....{in|stall me|
|000047d0| 6e 75 73 7d 0d 09 44 69 | 73 70 6f 73 48 61 6e 64 |nus}..Di|sposHand|
|000047e0| 6c 65 28 6d 65 6e 75 42 | 61 72 29 3b 0d 09 41 64 |le(menuB|ar);..Ad|
|000047f0| 64 52 65 73 4d 65 6e 75 | 28 47 65 74 4d 48 61 6e |dResMenu|(GetMHan|
|00004800| 64 6c 65 28 6d 41 70 70 | 6c 65 29 2c 20 27 44 52 |dle(mApp|le), 'DR|
|00004810| 56 52 27 29 3b 09 7b 61 | 64 64 20 44 41 20 6e 61 |VR');.{a|dd DA na|
|00004820| 6d 65 73 20 74 6f 20 41 | 70 70 6c 65 20 6d 65 6e |mes to A|pple men|
|00004830| 75 7d 0d 09 44 72 61 77 | 4d 65 6e 75 42 61 72 3b |u}..Draw|MenuBar;|
|00004840| 0d 0d 09 53 75 63 63 65 | 73 73 28 66 69 29 3b 0d |...Succe|ss(fi);.|
|00004850| 45 4e 44 3b 20 7b 49 6e | 69 74 69 61 6c 69 7a 65 |END; {In|itialize|
|00004860| 7d 0d 0d 0d 7b 24 53 20 | 4d 61 69 6e 7d 0d 50 52 |}...{$S |Main}.PR|
|00004870| 4f 43 45 44 55 52 45 20 | 54 65 72 6d 69 6e 61 74 |OCEDURE |Terminat|
|00004880| 65 3b 0d 56 41 52 0d 09 | 61 57 69 6e 64 6f 77 09 |e;.VAR..|aWindow.|
|00004890| 3a 20 57 69 6e 64 6f 77 | 50 74 72 3b 0d 09 63 6c |: Window|Ptr;..cl|
|000048a0| 6f 73 65 64 09 3a 20 42 | 4f 4f 4c 45 41 4e 3b 0d |osed.: B|OOLEAN;.|
|000048b0| 0d 42 45 47 49 4e 0d 09 | 63 6c 6f 73 65 64 20 3a |.BEGIN..|closed :|
|000048c0| 3d 20 54 52 55 45 3b 0d | 09 52 45 50 45 41 54 0d |= TRUE;.|.REPEAT.|
|000048d0| 09 09 61 57 69 6e 64 6f | 77 20 3a 3d 20 46 72 6f |..aWindo|w := Fro|
|000048e0| 6e 74 57 69 6e 64 6f 77 | 3b 09 09 09 09 09 7b 67 |ntWindow|;.....{g|
|000048f0| 65 74 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 66 |et the c|urrent f|
|00004900| 72 6f 6e 74 20 77 69 6e | 64 6f 77 7d 0d 09 09 49 |ront win|dow}...I|
|00004910| 46 20 61 57 69 6e 64 6f | 77 20 3c 3e 20 4e 49 4c |F aWindo|w <> NIL|
|00004920| 20 54 48 45 4e 0d 09 09 | 09 63 6c 6f 73 65 64 20 | THEN...|.closed |
|00004930| 3a 3d 20 44 6f 43 6c 6f | 73 65 57 69 6e 64 6f 77 |:= DoClo|seWindow|
|00004940| 28 61 57 69 6e 64 6f 77 | 29 3b 09 7b 63 6c 6f 73 |(aWindow|);.{clos|
|00004950| 65 20 74 68 69 73 20 77 | 69 6e 64 6f 77 7d 0d 09 |e this w|indow}..|
|00004960| 55 4e 54 49 4c 20 28 4e | 4f 54 20 63 6c 6f 73 65 |UNTIL (N|OT close|
|00004970| 64 29 20 7c 20 28 61 57 | 69 6e 64 6f 77 20 3d 20 |d) | (aW|indow = |
|00004980| 4e 49 4c 29 3b 09 09 7b | 64 6f 20 61 6c 6c 20 77 |NIL);..{|do all w|
|00004990| 69 6e 64 6f 77 73 7d 0d | 09 49 46 20 63 6c 6f 73 |indows}.|.IF clos|
|000049a0| 65 64 20 54 48 45 4e 0d | 09 09 45 78 69 74 54 6f |ed THEN.|..ExitTo|
|000049b0| 53 68 65 6c 6c 3b 09 09 | 09 09 09 09 09 7b 65 78 |Shell;..|.....{ex|
|000049c0| 69 74 20 69 66 20 6e 6f | 20 63 61 6e 63 65 6c 6c |it if no| cancell|
|000049d0| 61 74 69 6f 6e 7d 0d 45 | 4e 44 3b 20 7b 54 65 72 |ation}.E|ND; {Ter|
|000049e0| 6d 69 6e 61 74 65 7d 0d | 0d 0d 7b 24 53 20 4d 61 |minate}.|..{$S Ma|
|000049f0| 69 6e 7d 0d 50 52 4f 43 | 45 44 55 52 45 20 41 64 |in}.PROC|EDURE Ad|
|00004a00| 6a 75 73 74 4d 65 6e 75 | 73 3b 0d 56 41 52 0d 09 |justMenu|s;.VAR..|
|00004a10| 77 69 6e 64 6f 77 09 09 | 09 3a 20 57 69 6e 64 6f |window..|.: Windo|
|00004a20| 77 50 74 72 3b 0d 09 6d | 65 6e 75 09 09 09 3a 20 |wPtr;..m|enu...: |
|00004a30| 4d 65 6e 75 48 61 6e 64 | 6c 65 3b 0d 0d 42 45 47 |MenuHand|le;..BEG|
|00004a40| 49 4e 0d 09 77 69 6e 64 | 6f 77 20 3a 3d 20 46 72 |IN..wind|ow := Fr|
|00004a50| 6f 6e 74 57 69 6e 64 6f | 77 3b 0d 0d 09 6d 65 6e |ontWindo|w;...men|
|00004a60| 75 20 3a 3d 20 47 65 74 | 4d 48 61 6e 64 6c 65 28 |u := Get|MHandle(|
|00004a70| 6d 46 69 6c 65 29 3b 0d | 09 49 46 20 49 73 44 41 |mFile);.|.IF IsDA|
|00004a80| 57 69 6e 64 6f 77 28 77 | 69 6e 64 6f 77 29 20 54 |Window(w|indow) T|
|00004a90| 48 45 4e 09 09 09 09 7b | 77 65 20 63 61 6e 20 61 |HEN....{|we can a|
|00004aa0| 6c 6c 6f 77 20 64 65 73 | 6b 20 61 63 63 65 73 73 |llow des|k access|
|00004ab0| 6f 72 69 65 73 20 74 6f | 20 62 65 20 63 6c 6f 73 |ories to| be clos|
|00004ac0| 65 64 20 66 72 6f 6d 20 | 74 68 65 20 6d 65 6e 75 |ed from |the menu|
|00004ad0| 7d 0d 09 09 45 6e 61 62 | 6c 65 49 74 65 6d 28 6d |}...Enab|leItem(m|
|00004ae0| 65 6e 75 2c 20 69 43 6c | 6f 73 65 29 0d 09 45 4c |enu, iCl|ose)..EL|
|00004af0| 53 45 0d 09 09 44 69 73 | 61 62 6c 65 49 74 65 6d |SE...Dis|ableItem|
|00004b00| 28 6d 65 6e 75 2c 20 69 | 43 6c 6f 73 65 29 3b 09 |(menu, i|Close);.|
|00004b10| 09 09 7b 62 75 74 20 6e | 6f 74 20 6f 75 72 20 74 |..{but n|ot our t|
|00004b20| 72 61 66 66 69 63 20 6c | 69 67 68 74 20 77 69 6e |raffic l|ight win|
|00004b30| 64 6f 77 7d 0d 0d 09 6d | 65 6e 75 20 3a 3d 20 47 |dow}...m|enu := G|
|00004b40| 65 74 4d 48 61 6e 64 6c | 65 28 6d 45 64 69 74 29 |etMHandl|e(mEdit)|
|00004b50| 3b 0d 09 49 46 20 49 73 | 44 41 57 69 6e 64 6f 77 |;..IF Is|DAWindow|
|00004b60| 28 77 69 6e 64 6f 77 29 | 20 54 48 45 4e 20 42 45 |(window)| THEN BE|
|00004b70| 47 49 4e 09 09 7b 61 20 | 64 65 73 6b 20 61 63 63 |GIN..{a |desk acc|
|00004b80| 65 73 73 6f 72 79 20 6d | 69 67 68 74 20 6e 65 65 |essory m|ight nee|
|00004b90| 64 20 74 68 65 20 65 64 | 69 74 20 6d 65 6e 75 7d |d the ed|it menu}|
|00004ba0| 0d 09 09 45 6e 61 62 6c | 65 49 74 65 6d 28 6d 65 |...Enabl|eItem(me|
|00004bb0| 6e 75 2c 20 69 55 6e 64 | 6f 29 3b 0d 09 09 45 6e |nu, iUnd|o);...En|
|00004bc0| 61 62 6c 65 49 74 65 6d | 28 6d 65 6e 75 2c 20 69 |ableItem|(menu, i|
|00004bd0| 43 75 74 29 3b 0d 09 09 | 45 6e 61 62 6c 65 49 74 |Cut);...|EnableIt|
|00004be0| 65 6d 28 6d 65 6e 75 2c | 20 69 43 6f 70 79 29 3b |em(menu,| iCopy);|
|00004bf0| 0d 09 09 45 6e 61 62 6c | 65 49 74 65 6d 28 6d 65 |...Enabl|eItem(me|
|00004c00| 6e 75 2c 20 69 50 61 73 | 74 65 29 3b 0d 09 09 45 |nu, iPas|te);...E|
|00004c10| 6e 61 62 6c 65 49 74 65 | 6d 28 6d 65 6e 75 2c 20 |nableIte|m(menu, |
|00004c20| 69 43 6c 65 61 72 29 3b | 0d 09 45 4e 44 20 45 4c |iClear);|..END EL|
|00004c30| 53 45 20 42 45 47 49 4e | 09 09 09 09 09 09 09 7b |SE BEGIN|.......{|
|00004c40| 62 75 74 20 77 65 20 6b | 6e 6f 77 20 77 65 20 64 |but we k|now we d|
|00004c50| 6f 20 6e 6f 74 7d 0d 09 | 09 44 69 73 61 62 6c 65 |o not}..|.Disable|
|00004c60| 49 74 65 6d 28 6d 65 6e | 75 2c 20 69 55 6e 64 6f |Item(men|u, iUndo|
|00004c70| 29 3b 0d 09 09 44 69 73 | 61 62 6c 65 49 74 65 6d |);...Dis|ableItem|
|00004c80| 28 6d 65 6e 75 2c 20 69 | 43 75 74 29 3b 0d 09 09 |(menu, i|Cut);...|
|00004c90| 44 69 73 61 62 6c 65 49 | 74 65 6d 28 6d 65 6e 75 |DisableI|tem(menu|
|00004ca0| 2c 20 69 43 6f 70 79 29 | 3b 0d 09 09 44 69 73 61 |, iCopy)|;...Disa|
|00004cb0| 62 6c 65 49 74 65 6d 28 | 6d 65 6e 75 2c 20 69 43 |bleItem(|menu, iC|
|00004cc0| 6c 65 61 72 29 3b 0d 09 | 09 44 69 73 61 62 6c 65 |lear);..|.Disable|
|00004cd0| 49 74 65 6d 28 6d 65 6e | 75 2c 20 69 50 61 73 74 |Item(men|u, iPast|
|00004ce0| 65 29 3b 0d 09 45 4e 44 | 3b 0d 0d 45 4e 44 3b 20 |e);..END|;..END; |
|00004cf0| 7b 41 64 6a 75 73 74 4d | 65 6e 75 73 7d 0d 0d 0d |{AdjustM|enus}...|
|00004d00| 7b 24 53 20 4d 61 69 6e | 7d 0d 50 52 4f 43 45 44 |{$S Main|}.PROCED|
|00004d10| 55 52 45 20 44 6f 4d 65 | 6e 75 43 6f 6d 6d 61 6e |URE DoMe|nuComman|
|00004d20| 64 28 6d 65 6e 75 52 65 | 73 75 6c 74 3a 20 4c 4f |d(menuRe|sult: LO|
|00004d30| 4e 47 49 4e 54 29 3b 0d | 56 41 52 0d 09 6d 65 6e |NGINT);.|VAR..men|
|00004d40| 75 49 44 09 09 09 3a 20 | 49 4e 54 45 47 45 52 3b |uID...: |INTEGER;|
|00004d50| 09 09 7b 74 68 65 20 72 | 65 73 6f 75 72 63 65 20 |..{the r|esource |
|00004d60| 49 44 20 6f 66 20 74 68 | 65 20 73 65 6c 65 63 74 |ID of th|e select|
|00004d70| 65 64 20 6d 65 6e 75 7d | 0d 09 6d 65 6e 75 49 74 |ed menu}|..menuIt|
|00004d80| 65 6d 09 09 3a 20 49 4e | 54 45 47 45 52 3b 09 09 |em..: IN|TEGER;..|
|00004d90| 7b 74 68 65 20 69 74 65 | 6d 20 6e 75 6d 62 65 72 |{the ite|m number|
|00004da0| 20 6f 66 20 74 68 65 20 | 73 65 6c 65 63 74 65 64 | of the |selected|
|00004db0| 20 6d 65 6e 75 7d 0d 09 | 69 74 65 6d 48 69 74 09 | menu}..|itemHit.|
|00004dc0| 09 09 3a 20 49 4e 54 45 | 47 45 52 3b 0d 09 64 61 |..: INTE|GER;..da|
|00004dd0| 4e 61 6d 65 09 09 09 3a | 20 53 74 72 32 35 35 3b |Name...:| Str255;|
|00004de0| 0d 09 64 61 52 65 66 4e | 75 6d 09 09 3a 20 49 4e |..daRefN|um..: IN|
|00004df0| 54 45 47 45 52 3b 0d 09 | 68 61 6e 64 6c 65 64 42 |TEGER;..|handledB|
|00004e00| 79 44 41 09 09 3a 20 42 | 4f 4f 4c 45 41 4e 3b 0d |yDA..: B|OOLEAN;.|
|00004e10| 09 69 67 6e 6f 72 65 09 | 09 09 3a 20 42 4f 4f 4c |.ignore.|..: BOOL|
|00004e20| 45 41 4e 3b 0d 09 66 69 | 09 09 09 09 3a 20 46 61 |EAN;..fi|....: Fa|
|00004e30| 69 6c 49 6e 66 6f 3b 0d | 0d 09 50 52 4f 43 45 44 |ilInfo;.|..PROCED|
|00004e40| 55 52 45 20 48 61 6e 64 | 6c 65 4d 65 6e 75 28 65 |URE Hand|leMenu(e|
|00004e50| 72 72 6f 72 3a 20 49 4e | 54 45 47 45 52 3b 20 6d |rror: IN|TEGER; m|
|00004e60| 65 73 73 61 67 65 3a 20 | 4c 6f 6e 67 49 6e 74 29 |essage: |LongInt)|
|00004e70| 3b 0d 09 42 45 47 49 4e | 0d 09 09 48 69 6c 69 74 |;..BEGIN|...Hilit|
|00004e80| 65 4d 65 6e 75 28 30 29 | 3b 09 09 09 09 7b 75 6e |eMenu(0)|;....{un|
|00004e90| 68 69 67 68 6c 69 67 68 | 74 20 77 68 61 74 20 4d |highligh|t what M|
|00004ea0| 65 6e 75 53 65 6c 65 63 | 74 20 28 6f 72 20 4d 65 |enuSelec|t (or Me|
|00004eb0| 6e 75 4b 65 79 29 20 68 | 69 6c 69 74 65 64 7d 0d |nuKey) h|ilited}.|
|00004ec0| 09 45 4e 44 3b 0d 0d 42 | 45 47 49 4e 0d 09 43 61 |.END;..B|EGIN..Ca|
|00004ed0| 74 63 68 46 61 69 6c 75 | 72 65 73 28 66 69 2c 20 |tchFailu|res(fi, |
|00004ee0| 48 61 6e 64 6c 65 4d 65 | 6e 75 29 3b 0d 09 6d 65 |HandleMe|nu);..me|
|00004ef0| 6e 75 49 44 20 3a 3d 20 | 48 69 57 72 64 28 6d 65 |nuID := |HiWrd(me|
|00004f00| 6e 75 52 65 73 75 6c 74 | 29 3b 09 7b 75 73 65 20 |nuResult|);.{use |
|00004f10| 62 75 69 6c 74 2d 69 6e | 73 20 28 66 6f 72 20 65 |built-in|s (for e|
|00004f20| 66 66 69 63 69 65 6e 63 | 79 29 2e 2e 2e 7d 0d 09 |fficienc|y)...}..|
|00004f30| 6d 65 6e 75 49 74 65 6d | 20 3a 3d 20 4c 6f 57 72 |menuItem| := LoWr|
|00004f40| 64 28 6d 65 6e 75 52 65 | 73 75 6c 74 29 3b 09 7b |d(menuRe|sult);.{|
|00004f50| 74 6f 20 67 65 74 20 6d | 65 6e 75 20 69 74 65 6d |to get m|enu item|
|00004f60| 20 6e 75 6d 62 65 72 20 | 61 6e 64 20 6d 65 6e 75 | number |and menu|
|00004f70| 20 6e 75 6d 62 65 72 7d | 0d 09 43 41 53 45 20 6d | number}|..CASE m|
|00004f80| 65 6e 75 49 44 20 4f 46 | 0d 09 09 6d 41 70 70 6c |enuID OF|...mAppl|
|00004f90| 65 3a 0d 09 09 09 43 41 | 53 45 20 6d 65 6e 75 49 |e:....CA|SE menuI|
|00004fa0| 74 65 6d 20 4f 46 0d 09 | 09 09 09 69 41 62 6f 75 |tem OF..|...iAbou|
|00004fb0| 74 3a 09 09 09 09 7b 62 | 72 69 6e 67 20 75 70 20 |t:....{b|ring up |
|00004fc0| 61 6c 65 72 74 20 66 6f | 72 20 41 62 6f 75 74 7d |alert fo|r About}|
|00004fd0| 0d 09 09 09 09 09 69 74 | 65 6d 48 69 74 20 3a 3d |......it|emHit :=|
|00004fe0| 20 41 6c 65 72 74 28 72 | 41 62 6f 75 74 41 6c 65 | Alert(r|AboutAle|
|00004ff0| 72 74 2c 20 4e 49 4c 29 | 3b 0d 09 09 09 09 4f 54 |rt, NIL)|;.....OT|
|00005000| 48 45 52 57 49 53 45 20 | 42 45 47 49 4e 09 09 7b |HERWISE |BEGIN..{|
|00005010| 61 6c 6c 20 6e 6f 6e 2d | 41 62 6f 75 74 20 69 74 |all non-|About it|
|00005020| 65 6d 73 20 69 6e 20 74 | 68 69 73 20 6d 65 6e 75 |ems in t|his menu|
|00005030| 20 61 72 65 20 44 41 73 | 7d 0d 09 09 09 09 09 47 | are DAs|}......G|
|00005040| 65 74 49 74 65 6d 28 47 | 65 74 4d 48 61 6e 64 6c |etItem(G|etMHandl|
|00005050| 65 28 6d 41 70 70 6c 65 | 29 2c 20 6d 65 6e 75 49 |e(mApple|), menuI|
|00005060| 74 65 6d 2c 20 64 61 4e | 61 6d 65 29 3b 0d 09 09 |tem, daN|ame);...|
|00005070| 09 09 09 64 61 52 65 66 | 4e 75 6d 20 3a 3d 20 4f |...daRef|Num := O|
|00005080| 70 65 6e 44 65 73 6b 41 | 63 63 28 64 61 4e 61 6d |penDeskA|cc(daNam|
|00005090| 65 29 3b 0d 09 09 09 09 | 45 4e 44 3b 0d 09 09 09 |e);.....|END;....|
|000050a0| 45 4e 44 3b 0d 09 09 6d | 46 69 6c 65 3a 0d 09 09 |END;...m|File:...|
|000050b0| 09 43 41 53 45 20 6d 65 | 6e 75 49 74 65 6d 20 4f |.CASE me|nuItem O|
|000050c0| 46 0d 09 09 09 09 69 4e | 65 77 3a 0d 09 09 09 09 |F.....iN|ew:.....|
|000050d0| 09 44 6f 5a 6f 6e 65 4c | 69 73 74 3b 0d 09 09 09 |.DoZoneL|ist;....|
|000050e0| 09 69 43 6c 6f 73 65 3a | 0d 09 09 09 09 09 69 67 |.iClose:|......ig|
|000050f0| 6e 6f 72 65 20 3a 3d 20 | 44 6f 43 6c 6f 73 65 57 |nore := |DoCloseW|
|00005100| 69 6e 64 6f 77 28 46 72 | 6f 6e 74 57 69 6e 64 6f |indow(Fr|ontWindo|
|00005110| 77 29 3b 0d 09 09 09 09 | 69 51 75 69 74 3a 0d 09 |w);.....|iQuit:..|
|00005120| 09 09 09 09 54 65 72 6d | 69 6e 61 74 65 3b 0d 09 |....Term|inate;..|
|00005130| 09 09 45 4e 44 3b 0d 09 | 09 6d 45 64 69 74 3a 09 |..END;..|.mEdit:.|
|00005140| 09 09 09 09 09 7b 63 61 | 6c 6c 20 53 79 73 74 65 |.....{ca|ll Syste|
|00005150| 6d 45 64 69 74 20 66 6f | 72 20 44 41 20 65 64 69 |mEdit fo|r DA edi|
|00005160| 74 69 6e 67 20 26 20 4d | 75 6c 74 69 46 69 6e 64 |ting & M|ultiFind|
|00005170| 65 72 7d 0d 09 09 09 68 | 61 6e 64 6c 65 64 42 79 |er}....h|andledBy|
|00005180| 44 41 20 3a 3d 20 53 79 | 73 74 65 6d 45 64 69 74 |DA := Sy|stemEdit|
|00005190| 28 6d 65 6e 75 49 74 65 | 6d 2d 31 29 3b 09 7b 73 |(menuIte|m-1);.{s|
|000051a0| 69 6e 63 65 20 77 65 20 | 64 6f 6e 27 74 20 64 6f |ince we |don't do|
|000051b0| 20 61 6e 79 20 65 64 69 | 74 69 6e 67 7d 0d 09 45 | any edi|ting}..E|
|000051c0| 4e 44 3b 0d 09 53 75 63 | 63 65 73 73 28 66 69 29 |ND;..Suc|cess(fi)|
|000051d0| 3b 0d 09 48 69 6c 69 74 | 65 4d 65 6e 75 28 30 29 |;..Hilit|eMenu(0)|
|000051e0| 3b 09 09 09 09 09 7b 63 | 6c 65 61 6e 75 70 7d 0d |;.....{c|leanup}.|
|000051f0| 45 4e 44 3b 20 7b 44 6f | 4d 65 6e 75 43 6f 6d 6d |END; {Do|MenuComm|
|00005200| 61 6e 64 7d 0d 0d 0d 7b | 24 53 20 4d 61 69 6e 7d |and}...{|$S Main}|
|00005210| 0d 50 52 4f 43 45 44 55 | 52 45 20 44 6f 45 76 65 |.PROCEDU|RE DoEve|
|00005220| 6e 74 28 65 76 65 6e 74 | 3a 20 45 76 65 6e 74 52 |nt(event|: EventR|
|00005230| 65 63 6f 72 64 29 3b 0d | 56 41 52 0d 09 70 61 72 |ecord);.|VAR..par|
|00005240| 74 2c 20 65 72 72 09 3a | 20 49 4e 54 45 47 45 52 |t, err.:| INTEGER|
|00005250| 3b 0d 09 77 69 6e 64 6f | 77 09 09 3a 20 57 69 6e |;..windo|w..: Win|
|00005260| 64 6f 77 50 74 72 3b 0d | 09 68 69 74 09 09 09 3a |dowPtr;.|.hit...:|
|00005270| 20 42 4f 4f 4c 45 41 4e | 3b 0d 09 6b 65 79 09 09 | BOOLEAN|;..key..|
|00005280| 09 3a 20 43 48 41 52 3b | 0d 09 66 69 09 09 09 3a |.: CHAR;|..fi...:|
|00005290| 20 46 61 69 6c 49 6e 66 | 6f 3b 0d 09 61 50 6f 69 | FailInf|o;..aPoi|
|000052a0| 6e 74 09 09 3a 20 50 6f | 69 6e 74 3b 0d 0d 09 50 |nt..: Po|int;...P|
|000052b0| 52 4f 43 45 44 55 52 45 | 20 48 61 6e 64 6c 65 45 |ROCEDURE| HandleE|
|000052c0| 72 72 28 65 72 72 6f 72 | 3a 20 49 4e 54 45 47 45 |rr(error|: INTEGE|
|000052d0| 52 3b 20 6d 65 73 73 61 | 67 65 3a 20 4c 6f 6e 67 |R; messa|ge: Long|
|000052e0| 49 6e 74 29 3b 0d 09 42 | 45 47 49 4e 0d 09 09 49 |Int);..B|EGIN...I|
|000052f0| 46 20 65 72 72 6f 72 20 | 3e 20 30 20 54 48 45 4e |F error |> 0 THEN|
|00005300| 0d 09 09 09 41 6c 65 72 | 74 55 73 65 72 28 30 2c |....Aler|tUser(0,|
|00005310| 20 65 72 72 6f 72 29 0d | 09 09 45 4c 53 45 0d 09 | error).|..ELSE..|
|00005320| 09 09 41 6c 65 72 74 55 | 73 65 72 28 65 72 72 6f |..AlertU|ser(erro|
|00005330| 72 2c 20 6d 65 73 73 61 | 67 65 29 3b 0d 09 09 45 |r, messa|ge);...E|
|00005340| 58 49 54 28 44 6f 45 76 | 65 6e 74 29 3b 0d 09 45 |XIT(DoEv|ent);..E|
|00005350| 4e 44 3b 20 7b 48 61 6e | 64 6c 65 45 72 72 7d 0d |ND; {Han|dleErr}.|
|00005360| 0d 42 45 47 49 4e 0d 09 | 43 61 74 63 68 46 61 69 |.BEGIN..|CatchFai|
|00005370| 6c 75 72 65 73 28 66 69 | 2c 20 48 61 6e 64 6c 65 |lures(fi|, Handle|
|00005380| 45 72 72 29 3b 0d 0d 09 | 43 41 53 45 20 65 76 65 |Err);...|CASE eve|
|00005390| 6e 74 2e 77 68 61 74 20 | 4f 46 0d 09 09 6d 6f 75 |nt.what |OF...mou|
|000053a0| 73 65 44 6f 77 6e 3a 20 | 42 45 47 49 4e 0d 09 09 |seDown: |BEGIN...|
|000053b0| 09 70 61 72 74 20 3a 3d | 20 46 69 6e 64 57 69 6e |.part :=| FindWin|
|000053c0| 64 6f 77 28 65 76 65 6e | 74 2e 77 68 65 72 65 2c |dow(even|t.where,|
|000053d0| 20 77 69 6e 64 6f 77 29 | 3b 0d 09 09 09 43 41 53 | window)|;....CAS|
|000053e0| 45 20 70 61 72 74 20 4f | 46 0d 09 09 09 09 69 6e |E part O|F.....in|
|000053f0| 4d 65 6e 75 42 61 72 3a | 20 42 45 47 49 4e 09 09 |MenuBar:| BEGIN..|
|00005400| 09 7b 70 72 6f 63 65 73 | 73 20 74 68 65 20 6d 65 |.{proces|s the me|
|00005410| 6e 75 20 63 6f 6d 6d 61 | 6e 64 7d 0d 09 09 09 09 |nu comma|nd}.....|
|00005420| 09 41 64 6a 75 73 74 4d | 65 6e 75 73 3b 0d 09 09 |.AdjustM|enus;...|
|00005430| 09 09 09 44 6f 4d 65 6e | 75 43 6f 6d 6d 61 6e 64 |...DoMen|uCommand|
|00005440| 28 4d 65 6e 75 53 65 6c | 65 63 74 28 65 76 65 6e |(MenuSel|ect(even|
|00005450| 74 2e 77 68 65 72 65 29 | 29 3b 0d 09 09 09 09 45 |t.where)|);.....E|
|00005460| 4e 44 3b 0d 09 09 09 09 | 69 6e 53 79 73 57 69 6e |ND;.....|inSysWin|
|00005470| 64 6f 77 3a 09 09 09 09 | 7b 6c 65 74 20 74 68 65 |dow:....|{let the|
|00005480| 20 73 79 73 74 65 6d 20 | 68 61 6e 64 6c 65 20 74 | system |handle t|
|00005490| 68 65 20 6d 6f 75 73 65 | 44 6f 77 6e 7d 0d 09 09 |he mouse|Down}...|
|000054a0| 09 09 09 53 79 73 74 65 | 6d 43 6c 69 63 6b 28 65 |...Syste|mClick(e|
|000054b0| 76 65 6e 74 2c 20 77 69 | 6e 64 6f 77 29 3b 0d 09 |vent, wi|ndow);..|
|000054c0| 09 09 09 69 6e 43 6f 6e | 74 65 6e 74 3a 3b 0d 09 |...inCon|tent:;..|
|000054d0| 09 09 09 69 6e 44 72 61 | 67 3a 3b 0d 09 09 09 09 |...inDra|g:;.....|
|000054e0| 69 6e 47 72 6f 77 3a 3b | 0d 09 09 09 09 69 6e 5a |inGrow:;|.....inZ|
|000054f0| 6f 6f 6d 49 6e 2c 20 69 | 6e 5a 6f 6f 6d 4f 75 74 |oomIn, i|nZoomOut|
|00005500| 3a 3b 0d 09 09 09 45 4e | 44 3b 0d 09 09 45 4e 44 |:;....EN|D;...END|
|00005510| 3b 0d 09 09 6b 65 79 44 | 6f 77 6e 2c 20 61 75 74 |;...keyD|own, aut|
|00005520| 6f 4b 65 79 3a 20 42 45 | 47 49 4e 09 09 09 09 7b |oKey: BE|GIN....{|
|00005530| 63 68 65 63 6b 20 66 6f | 72 20 6d 65 6e 75 6b 65 |check fo|r menuke|
|00005540| 79 20 65 71 75 69 76 61 | 6c 65 6e 74 73 7d 0d 09 |y equiva|lents}..|
|00005550| 09 09 6b 65 79 20 3a 3d | 20 43 48 52 28 42 41 6e |..key :=| CHR(BAn|
|00005560| 64 28 65 76 65 6e 74 2e | 6d 65 73 73 61 67 65 2c |d(event.|message,|
|00005570| 20 63 68 61 72 43 6f 64 | 65 4d 61 73 6b 29 29 3b | charCod|eMask));|
|00005580| 0d 09 09 09 49 46 20 42 | 41 6e 64 28 65 76 65 6e |....IF B|And(even|
|00005590| 74 2e 6d 6f 64 69 66 69 | 65 72 73 2c 20 63 6d 64 |t.modifi|ers, cmd|
|000055a0| 4b 65 79 29 20 3c 3e 20 | 30 20 54 48 45 4e 09 7b |Key) <> |0 THEN.{|
|000055b0| 43 6f 6d 6d 61 6e 64 20 | 6b 65 79 20 64 6f 77 6e |Command |key down|
|000055c0| 7d 0d 09 09 09 09 49 46 | 20 65 76 65 6e 74 2e 77 |}.....IF| event.w|
|000055d0| 68 61 74 20 3d 20 6b 65 | 79 44 6f 77 6e 20 54 48 |hat = ke|yDown TH|
|000055e0| 45 4e 20 42 45 47 49 4e | 0d 09 09 09 09 09 41 64 |EN BEGIN|......Ad|
|000055f0| 6a 75 73 74 4d 65 6e 75 | 73 3b 09 09 09 7b 65 6e |justMenu|s;...{en|
|00005600| 61 62 6c 65 2f 64 69 73 | 61 62 6c 65 2f 63 68 65 |able/dis|able/che|
|00005610| 63 6b 20 6d 65 6e 75 20 | 69 74 65 6d 73 20 70 72 |ck menu |items pr|
|00005620| 6f 70 65 72 6c 79 7d 0d | 09 09 09 09 09 44 6f 4d |operly}.|.....DoM|
|00005630| 65 6e 75 43 6f 6d 6d 61 | 6e 64 28 4d 65 6e 75 4b |enuComma|nd(MenuK|
|00005640| 65 79 28 6b 65 79 29 29 | 3b 0d 09 09 09 09 45 4e |ey(key))|;.....EN|
|00005650| 44 3b 0d 09 09 45 4e 44 | 3b 20 20 20 20 20 20 20 |D;...END|; |
|00005660| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005670| 20 20 20 20 20 20 20 20 | 20 7b 63 61 6c 6c 20 44 | | {call D|
|00005680| 6f 41 63 74 69 76 61 74 | 65 20 77 69 74 68 20 74 |oActivat|e with t|
|00005690| 68 65 20 77 69 6e 64 6f | 77 20 61 6e 64 2e 2e 2e |he windo|w and...|
|000056a0| 7d 0d 09 09 61 63 74 69 | 76 61 74 65 45 76 74 3a |}...acti|vateEvt:|
|000056b0| 3b 0d 09 09 75 70 64 61 | 74 65 45 76 74 3a 3b 0d |;...upda|teEvt:;.|
|000056c0| 09 09 7b 31 2e 30 31 20 | 2d 20 49 74 20 69 73 20 |..{1.01 |- It is |
|000056d0| 6e 6f 74 20 61 20 62 61 | 64 20 69 64 65 61 20 74 |not a ba|d idea t|
|000056e0| 6f 20 61 74 20 6c 65 61 | 73 74 20 63 61 6c 6c 20 |o at lea|st call |
|000056f0| 44 49 42 61 64 4d 6f 75 | 6e 74 20 69 6e 20 72 65 |DIBadMou|nt in re|
|00005700| 73 70 6f 6e 73 65 0d 09 | 09 20 74 6f 20 61 20 64 |sponse..|. to a d|
|00005710| 69 73 6b 45 76 74 2c 20 | 73 6f 20 74 68 61 74 20 |iskEvt, |so that |
|00005720| 74 68 65 20 75 73 65 72 | 20 63 61 6e 20 66 6f 72 |the user| can for|
|00005730| 6d 61 74 20 61 20 66 6c | 6f 70 70 79 2e 7d 0d 09 |mat a fl|oppy.}..|
|00005740| 09 64 69 73 6b 45 76 74 | 3a 0d 09 09 09 49 46 20 |.diskEvt|:....IF |
|00005750| 48 69 57 72 64 28 65 76 | 65 6e 74 2e 6d 65 73 73 |HiWrd(ev|ent.mess|
|00005760| 61 67 65 29 20 3c 3e 20 | 6e 6f 45 72 72 20 54 48 |age) <> |noErr TH|
|00005770| 45 4e 20 42 45 47 49 4e | 0d 09 09 09 09 53 65 74 |EN BEGIN|.....Set|
|00005780| 50 74 28 61 50 6f 69 6e | 74 2c 20 6b 44 49 4c 65 |Pt(aPoin|t, kDILe|
|00005790| 66 74 2c 20 6b 44 49 54 | 6f 70 29 3b 0d 09 09 09 |ft, kDIT|op);....|
|000057a0| 09 65 72 72 20 3a 3d 20 | 44 49 42 61 64 4d 6f 75 |.err := |DIBadMou|
|000057b0| 6e 74 28 61 50 6f 69 6e | 74 2c 20 65 76 65 6e 74 |nt(aPoin|t, event|
|000057c0| 2e 6d 65 73 73 61 67 65 | 29 3b 0d 09 09 09 45 4e |.message|);....EN|
|000057d0| 44 3b 0d 09 09 6b 4f 53 | 45 76 65 6e 74 3a 0d 09 |D;...kOS|Event:..|
|000057e0| 09 09 43 41 53 45 20 42 | 41 6e 64 28 42 52 6f 74 |..CASE B|And(BRot|
|000057f0| 4c 28 65 76 65 6e 74 2e | 6d 65 73 73 61 67 65 2c |L(event.|message,|
|00005800| 20 38 29 2c 20 32 35 35 | 29 20 4f 46 09 7b 68 69 | 8), 255|) OF.{hi|
|00005810| 67 68 20 62 79 74 65 20 | 6f 66 20 6d 65 73 73 61 |gh byte |of messa|
|00005820| 67 65 7d 0d 09 09 09 09 | 6b 53 75 73 70 65 6e 64 |ge}.....|kSuspend|
|00005830| 52 65 73 75 6d 65 4d 65 | 73 73 61 67 65 3a 20 42 |ResumeMe|ssage: B|
|00005840| 45 47 49 4e 0d 09 09 09 | 09 09 67 49 6e 42 61 63 |EGIN....|..gInBac|
|00005850| 6b 67 72 6f 75 6e 64 20 | 3a 3d 20 42 41 6e 64 28 |kground |:= BAnd(|
|00005860| 65 76 65 6e 74 2e 6d 65 | 73 73 61 67 65 2c 20 6b |event.me|ssage, k|
|00005870| 52 65 73 75 6d 65 4d 61 | 73 6b 29 20 3d 20 30 3b |ResumeMa|sk) = 0;|
|00005880| 0d 09 09 09 09 45 4e 44 | 3b 0d 09 09 09 45 4e 44 |.....END|;....END|
|00005890| 3b 0d 09 45 4e 44 3b 0d | 0d 09 53 75 63 63 65 73 |;..END;.|..Succes|
|000058a0| 73 28 66 69 29 3b 0d 45 | 4e 44 3b 20 7b 44 6f 45 |s(fi);.E|ND; {DoE|
|000058b0| 76 65 6e 74 7d 0d 0d 0d | 7b 24 53 20 4d 61 69 6e |vent}...|{$S Main|
|000058c0| 7d 0d 50 52 4f 43 45 44 | 55 52 45 20 45 76 65 6e |}.PROCED|URE Even|
|000058d0| 74 4c 6f 6f 70 3b 0d 56 | 41 52 0d 09 63 75 72 73 |tLoop;.V|AR..curs|
|000058e0| 6f 72 52 67 6e 09 3a 20 | 52 67 6e 48 61 6e 64 6c |orRgn.: |RgnHandl|
|000058f0| 65 3b 0d 09 67 6f 74 45 | 76 65 6e 74 09 3a 20 42 |e;..gotE|vent.: B|
|00005900| 4f 4f 4c 45 41 4e 3b 0d | 09 65 76 65 6e 74 09 09 |OOLEAN;.|.event..|
|00005910| 3a 20 45 76 65 6e 74 52 | 65 63 6f 72 64 3b 0d 0d |: EventR|ecord;..|
|00005920| 42 45 47 49 4e 0d 09 63 | 75 72 73 6f 72 52 67 6e |BEGIN..c|ursorRgn|
|00005930| 20 3a 3d 20 4e 65 77 52 | 67 6e 3b 09 09 09 7b 77 | := NewR|gn;...{w|
|00005940| 65 d5 6c 6c 20 70 61 73 | 73 20 57 4e 45 20 61 6e |e.ll pas|s WNE an|
|00005950| 20 65 6d 70 74 79 20 72 | 65 67 69 6f 6e 20 74 68 | empty r|egion th|
|00005960| 65 20 31 73 74 20 74 69 | 6d 65 20 74 68 72 75 7d |e 1st ti|me thru}|
|00005970| 0d 0d 09 52 45 50 45 41 | 54 0d 09 09 49 46 20 67 |...REPEA|T...IF g|
|00005980| 48 61 73 57 61 69 74 4e | 65 78 74 45 76 65 6e 74 |HasWaitN|extEvent|
|00005990| 20 54 48 45 4e 09 7b 70 | 75 74 20 75 73 20 27 61 | THEN.{p|ut us 'a|
|000059a0| 73 6c 65 65 70 27 20 66 | 6f 72 65 76 65 72 20 75 |sleep' f|orever u|
|000059b0| 6e 64 65 72 20 4d 75 6c | 74 69 46 69 6e 64 65 72 |nder Mul|tiFinder|
|000059c0| 7d 0d 09 09 09 67 6f 74 | 45 76 65 6e 74 20 3a 3d |}....got|Event :=|
|000059d0| 20 57 61 69 74 4e 65 78 | 74 45 76 65 6e 74 28 65 | WaitNex|tEvent(e|
|000059e0| 76 65 72 79 45 76 65 6e | 74 2c 20 65 76 65 6e 74 |veryEven|t, event|
|000059f0| 2c 20 4d 41 58 4c 4f 4e | 47 49 4e 54 2c 20 63 75 |, MAXLON|GINT, cu|
|00005a00| 72 73 6f 72 52 67 6e 29 | 0d 09 09 45 4c 53 45 20 |rsorRgn)|...ELSE |
|00005a10| 42 45 47 49 4e 0d 09 09 | 09 53 79 73 74 65 6d 54 |BEGIN...|.SystemT|
|00005a20| 61 73 6b 3b 09 09 09 09 | 7b 6d 75 73 74 20 62 65 |ask;....|{must be|
|00005a30| 20 63 61 6c 6c 65 64 20 | 69 66 20 75 73 69 6e 67 | called |if using|
|00005a40| 20 47 65 74 4e 65 78 74 | 45 76 65 6e 74 7d 0d 09 | GetNext|Event}..|
|00005a50| 09 09 67 6f 74 45 76 65 | 6e 74 20 3a 3d 20 47 65 |..gotEve|nt := Ge|
|00005a60| 74 4e 65 78 74 45 76 65 | 6e 74 28 65 76 65 72 79 |tNextEve|nt(every|
|00005a70| 45 76 65 6e 74 2c 20 65 | 76 65 6e 74 29 3b 0d 09 |Event, e|vent);..|
|00005a80| 09 45 4e 44 3b 0d 09 09 | 49 46 20 67 6f 74 45 76 |.END;...|IF gotEv|
|00005a90| 65 6e 74 20 54 48 45 4e | 20 42 45 47 49 4e 0d 09 |ent THEN| BEGIN..|
|00005aa0| 09 09 44 6f 45 76 65 6e | 74 28 65 76 65 6e 74 29 |..DoEven|t(event)|
|00005ab0| 3b 0d 09 09 45 4e 44 3b | 0d 09 55 4e 54 49 4c 20 |;...END;|..UNTIL |
|00005ac0| 46 41 4c 53 45 3b 09 09 | 09 09 09 7b 6c 6f 6f 70 |FALSE;..|...{loop|
|00005ad0| 20 66 6f 72 65 76 65 72 | 3b 20 77 65 20 71 75 69 | forever|; we qui|
|00005ae0| 74 20 74 68 72 6f 75 67 | 68 20 61 6e 20 45 78 69 |t throug|h an Exi|
|00005af0| 74 54 6f 53 68 65 6c 6c | 7d 0d 45 4e 44 3b 20 7b |tToShell|}.END; {|
|00005b00| 45 76 65 6e 74 4c 6f 6f | 70 7d 0d 0d 0d 50 52 4f |EventLoo|p}...PRO|
|00005b10| 43 45 44 55 52 45 20 5f | 44 61 74 61 49 6e 69 74 |CEDURE _|DataInit|
|00005b20| 3b 20 45 58 54 45 52 4e | 41 4c 3b 0d 0d 0d 7b 24 |; EXTERN|AL;...{$|
|00005b30| 53 20 4d 61 69 6e 7d 0d | 42 45 47 49 4e 0d 09 55 |S Main}.|BEGIN..U|
|00005b40| 6e 6c 6f 61 64 53 65 67 | 28 40 5f 44 61 74 61 49 |nloadSeg|(@_DataI|
|00005b50| 6e 69 74 29 3b 09 09 7b | 6e 6f 74 65 20 74 68 61 |nit);..{|note tha|
|00005b60| 74 20 5f 44 61 74 61 49 | 6e 69 74 20 6d 75 73 74 |t _DataI|nit must|
|00005b70| 20 6e 6f 74 20 62 65 20 | 69 6e 20 4d 61 69 6e 21 | not be |in Main!|
|00005b80| 7d 0d 09 4d 61 78 41 70 | 70 6c 5a 6f 6e 65 3b 09 |}..MaxAp|plZone;.|
|00005b90| 09 09 09 7b 65 78 70 61 | 6e 64 20 74 68 65 20 68 |...{expa|nd the h|
|00005ba0| 65 61 70 20 73 6f 20 63 | 6f 64 65 20 73 65 67 6d |eap so c|ode segm|
|00005bb0| 65 6e 74 73 20 6c 6f 61 | 64 20 61 74 20 74 68 65 |ents loa|d at the|
|00005bc0| 20 74 6f 70 7d 0d 0d 09 | 49 6e 69 74 53 69 67 6e | top}...|InitSign|
|00005bd0| 61 6c 73 3b 0d 09 49 6e | 69 74 69 61 6c 69 7a 65 |als;..In|itialize|
|00005be0| 3b 09 09 09 09 09 7b 69 | 6e 69 74 69 61 6c 69 7a |;.....{i|nitializ|
|00005bf0| 65 20 74 68 65 20 70 72 | 6f 67 72 61 6d 7d 0d 09 |e the pr|ogram}..|
|00005c00| 55 6e 6c 6f 61 64 53 65 | 67 28 40 49 6e 69 74 69 |UnloadSe|g(@Initi|
|00005c10| 61 6c 69 7a 65 29 3b 09 | 09 7b 6e 6f 74 65 20 74 |alize);.|.{note t|
|00005c20| 68 61 74 20 49 6e 69 74 | 69 61 6c 69 7a 65 20 6d |hat Init|ialize m|
|00005c30| 75 73 74 20 6e 6f 74 20 | 62 65 20 69 6e 20 4d 61 |ust not |be in Ma|
|00005c40| 69 6e 21 7d 0d 0d 09 45 | 76 65 6e 74 4c 6f 6f 70 |in!}...E|ventLoop|
|00005c50| 3b 09 09 09 09 09 7b 63 | 61 6c 6c 20 74 68 65 20 |;.....{c|all the |
|00005c60| 6d 61 69 6e 20 65 76 65 | 6e 74 20 6c 6f 6f 70 7d |main eve|nt loop}|
|00005c70| 0d 45 4e 44 2e 0d 00 00 | 00 00 00 00 00 00 00 00 |.END....|........|
|00005c80| 00 00 01 00 00 00 03 2c | 00 00 02 2c 00 00 00 4a |.......,|...,...J|
|00005c90| 50 6f 72 74 5e 2e 70 6f | 72 74 52 65 63 74 2c 20 |Port^.po|rtRect, |
|00005ca0| 74 65 78 74 48 29 3b 20 | 7b 63 61 6c 6c 20 54 65 |textH); |{call Te|
|00005cb0| 0d 47 65 74 5a 6f 6e 65 | 4c 69 73 74 2e 70 02 00 |.GetZone|List.p..|
|00005cc0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 14 00 60 |..TEXTMP|S .....`|
|00005cd0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 14 00 60 |..TEXTMP|S .....`|
|00005ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005cf0| 00 00 a2 64 55 53 00 00 | 00 00 00 00 03 76 69 6e |...dUS..|.....vin|
|00005d00| 64 6f 77 20 4d 67 72 20 | 74 6f 20 65 6e 64 20 75 |dow Mgr |to end u|
|00005d10| 70 64 61 74 65 7d 0d 09 | 09 09 20 20 45 4e 44 3b |pdate}..|.. END;|
|00005d20| 20 7b 6f 66 20 75 70 64 | 61 74 65 45 76 74 7d 0d | {of upd|ateEvt}.|
|00005d30| 0d 09 09 45 4e 44 3b 20 | 7b 6f 66 20 65 76 65 6e |...END; |{of even|
|00005d40| 74 20 43 41 53 45 7d 0d | 0d 09 55 4e 54 49 4c 20 |t CASE}.|..UNTIL |
|00005d50| 64 6f 6e 65 46 6c 61 67 | 3b 0d 20 20 45 4e 44 2e |doneFlag|;. END.|
|00005d60| 0d 46 49 52 4d 20 4e 56 | 00 00 48 e7 20 00 4e ad |.FIRM NV|..H. .N.|
|00005d70| 00 4a 4a 80 67 08 4e ba | e3 28 70 00 60 20 4e ba |.JJ.g.N.|.(p.` N.|
|00005d80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00005d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005da0| 00 00 00 00 00 00 00 06 | 00 04 00 2a 00 05 01 d3 |........|...*....|
|00005db0| 02 5d 00 2a 00 05 01 d3 | 02 5d a2 63 69 5d 00 00 |.].*....|.].ci]..|
|00005dc0| 04 fb 00 00 04 fb 00 00 | 00 00 01 00 00 00 01 ba |........|........|
|00005dd0| 00 16 00 00 04 58 00 00 | 04 63 0b 47 65 74 5a 6f |.....X..|.c.GetZo|
|00005de0| 6e 65 4c 69 73 74 00 00 | 13 4a 00 00 13 56 0d 46 |neList..|.J...V.F|
|00005df0| 61 69 6c 4f 53 45 72 72 | 4d 73 67 00 00 00 13 d9 |ailOSErr|Msg.....|
|00005e00| 00 00 13 e3 0b 46 61 69 | 6c 4e 49 4c 4d 73 67 00 |.....Fai|lNILMsg.|
|00005e10| 00 00 14 63 00 00 14 6c | 09 41 6c 65 72 74 55 73 |...c...l|.AlertUs|
|00005e20| 65 72 00 00 16 b6 00 00 | 16 c0 0b 49 73 44 41 57 |er......|...IsDAW|
|00005e30| 69 6e 64 6f 77 00 00 00 | 17 98 00 00 17 a3 0b 49 |indow...|.......I|
|00005e40| 73 41 70 70 57 69 6e 64 | 6f 77 00 00 18 d2 00 00 |sAppWind|ow......|
|00005e50| 18 df 0d 42 75 69 6c 64 | 5a 6f 6e 65 4c 69 73 74 |...Build|ZoneList|
|00005e60| 00 00 23 a0 00 00 23 b3 | 13 42 75 69 6c 64 5a 6f |..#...#.|.BuildZo|
|00005e70| 6e 65 4c 69 73 74 50 68 | 61 73 65 32 00 00 2e bf |neListPh|ase2....|
|00005e80| 00 00 2e cb 0d 5a 6f 6e | 65 4c 69 73 74 44 72 61 |.....Zon|eListDra|
|00005e90| 77 00 00 00 32 77 00 00 | 32 81 0b 4c 69 73 74 46 |w...2w..|2..ListF|
|00005ea0| 69 6c 74 65 72 00 00 00 | 38 11 00 00 38 1b 0b 44 |ilter...|8...8..D|
|00005eb0| 6f 5a 6f 6e 65 4c 69 73 | 74 00 00 00 39 74 00 00 |oZoneLis|t...9t..|
|00005ec0| 39 7b 07 43 6c 65 61 6e | 55 70 00 00 41 cb 00 00 |9{.Clean|Up..A...|
|00005ed0| 41 d8 0d 44 6f 43 6c 6f | 73 65 57 69 6e 64 6f 77 |A..DoClo|seWindow|
|00005ee0| 00 00 42 c6 00 00 42 d0 | 0b 49 6e 69 74 69 61 6c |..B...B.|.Initial|
|00005ef0| 69 7a 65 00 00 00 47 f8 | 00 00 48 01 09 54 65 72 |ize...G.|..H..Ter|
|00005f00| 6d 69 6e 61 74 65 00 00 | 49 7e 00 00 49 89 0b 41 |minate..|I~..I..A|
|00005f10| 64 6a 75 73 74 4d 65 6e | 75 73 00 00 4c 94 00 00 |djustMen|us..L...|
|00005f20| 4c a1 0d 44 6f 4d 65 6e | 75 43 6f 6d 6d 61 6e 64 |L..DoMen|uCommand|
|00005f30| 00 00 4d c4 00 00 4d ce | 0b 48 61 6e 64 6c 65 4d |..M...M.|.HandleM|
|00005f40| 65 6e 75 00 00 00 51 9b | 00 00 51 a2 07 44 6f 45 |enu...Q.|..Q..DoE|
|00005f50| 76 65 6e 74 00 00 52 39 | 00 00 52 42 09 48 61 6e |vent..R9|..RB.Han|
|00005f60| 64 6c 65 45 72 72 00 00 | 58 4c 00 00 58 55 09 45 |dleErr..|XL..XU.E|
|00005f70| 76 65 6e 74 4c 6f 6f 70 | 00 00 5a 97 00 00 5a a0 |ventLoop|..Z...Z.|
|00005f80| 09 5f 44 61 74 61 49 6e | 69 74 00 00 00 1e 00 2a |._DataIn|it.....*|
|00005f90| 00 05 01 d3 02 5d 00 2a | 00 05 01 d3 02 5d 00 00 |.....].*|.....]..|
|00005fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 01 00 |........|........|
|00005fb0| 00 00 03 2c 00 00 02 2c | 00 00 00 4a 00 4c b1 44 |...,...,|...J.L.D|
|00005fc0| 0c dc 00 00 00 1c 00 4a | 00 00 4d 50 53 52 00 02 |.......J|..MPSR..|
|00005fd0| 00 0a 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 ef |........|........|
|00005fe0| ff ff 00 00 00 4c 00 00 | 00 00 03 f0 ff ff 00 00 |.....L..|........|
|00005ff0| 02 0a 00 4e 93 60 00 00 | 00 00 00 00 00 00 00 00 |...N.`..|........|
+--------+-------------------------+-------------------------+--------+--------+